Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Is it possible to resize a tree row ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christophe Charron  
View profile  
 More options Apr 6 2007, 2:53 pm
Newsgroups: mozilla.dev.tech.xul
From: "Christophe Charron" <christophe.charron....@gmail.com>
Date: 6 Apr 2007 11:53:47 -0700
Local: Fri, Apr 6 2007 2:53 pm
Subject: Is it possible to resize a tree row ?
Hi,
everything is told in the subject.
In fact, i think it is impossible because when i use "Ctrl+" or
"ctrl-", lot of objects change their size except tree rows. And then,
text does'nt fit any more if it was a "ctrl+" !!

Could somebody tell me more about it ? a bug ?

--
Cordially,
Christophe Charron


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Igor Tandetnik  
View profile  
 More options Apr 6 2007, 3:05 pm
Newsgroups: mozilla.dev.tech.xul
From: "Igor Tandetnik" <itandet...@mvps.org>
Date: Fri, 6 Apr 2007 15:05:59 -0400
Local: Fri, Apr 6 2007 3:05 pm
Subject: Re: Is it possible to resize a tree row ?

Christophe Charron <christophe.charron....@gmail.com> wrote:
> everything is told in the subject.

You can assign height to rows in a stylesheet. For example:

treechildren::-moz-tree-row {
    height: 100px;

}

Changing the font size in the tree also results in rows getting taller
to accomodate larger text (but in my experiments, choosing smaller font
size didn't result in rows getting shorter):

treechildren {
    font-size: 200%;

}

Igor Tandetnik

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Apr 6 2007, 3:59 pm
Newsgroups: mozilla.dev.tech.xul
From: Neil <n...@parkwaycc.co.uk>
Date: Fri, 06 Apr 2007 20:59:37 +0100
Local: Fri, Apr 6 2007 3:59 pm
Subject: Re: Is it possible to resize a tree row ?

Igor Tandetnik wrote:
>Changing the font size in the tree also results in rows getting taller to accomodate larger text (but in my experiments, choosing smaller font size didn't result in rows getting shorter)

The default theme styles rows with a height of 1.3em and a min-height of
18px.

--
Warning: May contain traces of nuts.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Apr 6 2007, 4:00 pm
Newsgroups: mozilla.dev.tech.xul
From: Neil <n...@parkwaycc.co.uk>
Date: Fri, 06 Apr 2007 21:00:31 +0100
Local: Fri, Apr 6 2007 4:00 pm
Subject: Re: Is it possible to resize a tree row ?

Christophe Charron wrote:
>In fact, i think it is impossible because when i use "Ctrl+" or "ctrl-", lot of objects change their size except tree rows.

Unfortunately tree rows remember their height when they are created, and
don't subsequently adjust for font size changes.

--
Warning: May contain traces of nuts.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Igor Tandetnik  
View profile  
 More options Apr 6 2007, 4:13 pm
Newsgroups: mozilla.dev.tech.xul
From: "Igor Tandetnik" <itandet...@mvps.org>
Date: Fri, 6 Apr 2007 16:13:03 -0400
Local: Fri, Apr 6 2007 4:13 pm
Subject: Re: Is it possible to resize a tree row ?

Neil <n...@parkwaycc.co.uk> wrote:
> Christophe Charron wrote:

>> In fact, i think it is impossible because when i use "Ctrl+" or
>> "ctrl-", lot of objects change their size except tree rows.
> Unfortunately tree rows remember their height when they are created,
> and don't subsequently adjust for font size changes.

There's a way to force them. This works for me:

var stylesheet = document.styleSheets[0];
var rule = "tree {-moz-binding: none !important;}";
stylesheet.insertRule(rule, stylesheet.cssRules.length);
stylesheet.deleteRule(stylesheet.cssRules.length - 1);

Removing and re-enabling XBL binding seems to force the tree to
recalculate its metrics based on whatever styles are effective at the
time.

Igor Tandetnik


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe Charron  
View profile  
 More options Apr 6 2007, 5:43 pm
Newsgroups: mozilla.dev.tech.xul
From: "Christophe Charron" <christophe.charron....@gmail.com>
Date: 6 Apr 2007 14:43:03 -0700
Local: Fri, Apr 6 2007 5:43 pm
Subject: Re: Is it possible to resize a tree row ?
On 6 avr, 21:05, "Igor Tandetnik" <itandet...@mvps.org> wrote:

Thanks, both work.
Is there a way to use classes with treechildren::-moz-tree-row
I tried treechildren::-moz-tree-row(test) {
   height: 100px;
}
but no change !!
> Igor Tandetnik

--
Cordially,
Christophe Charron

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe Charron  
View profile  
 More options Apr 6 2007, 5:47 pm
Newsgroups: mozilla.dev.tech.xul
From: "Christophe Charron" <christophe.charron....@gmail.com>
Date: 6 Apr 2007 14:47:54 -0700
Local: Fri, Apr 6 2007 5:47 pm
Subject: Re: Is it possible to resize a tree row ?
On 6 avr, 22:13, "Igor Tandetnik" <itandet...@mvps.org> wrote:

Whoua ... i'll try that ...
A "last" question: Is there a way to know  if font size was changed ?
--
Cordially,
Christophe Charron

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe Charron  
View profile  
 More options Apr 6 2007, 5:49 pm
Newsgroups: mozilla.dev.tech.xul
From: "Christophe Charron" <christophe.charron....@gmail.com>
Date: 6 Apr 2007 14:49:35 -0700
Local: Fri, Apr 6 2007 5:49 pm
Subject: Re: Is it possible to resize a tree row ?
On 6 avr, 22:00, Neil <n...@parkwaycc.co.uk> wrote:

> Christophe Charron wrote:
> >In fact, i think it is impossible because when i use "Ctrl+" or "ctrl-", lot of objects change their size except tree rows.

> Unfortunately tree rows remember their height when they are created, and
> don't subsequently adjust for font size changes.

Why only trees ? Other objects don't seem to remember this
property ? !

--
Cordially,
Christophe Charron


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Apr 6 2007, 7:19 pm
Newsgroups: mozilla.dev.tech.xul
From: Neil <n...@parkwaycc.co.uk>
Date: Sat, 07 Apr 2007 00:19:52 +0100
Local: Fri, Apr 6 2007 7:19 pm
Subject: Re: Is it possible to resize a tree row ?

Christophe Charron wrote:
> Is there a way to use classes with treechildren::-moz-tree-row

No. Each row in a tree is the same height.

--
Warning: May contain traces of nuts.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Apr 6 2007, 7:23 pm
Newsgroups: mozilla.dev.tech.xul
From: Neil <n...@parkwaycc.co.uk>
Date: Sat, 07 Apr 2007 00:23:07 +0100
Local: Fri, Apr 6 2007 7:23 pm
Subject: Re: Is it possible to resize a tree row ?

Igor Tandetnik wrote:
> Removing and re-enabling XBL binding seems to force the tree to
> recalculate its metrics based on whatever styles are effective at the
> time.

Actually anything that will recreate the tree body frame will do -
hiding and showing the tree should work, I think.

--
Warning: May contain traces of nuts.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Igor Tandetnik  
View profile  
 More options Apr 6 2007, 7:39 pm
Newsgroups: mozilla.dev.tech.xul
From: "Igor Tandetnik" <itandet...@mvps.org>
Date: Fri, 6 Apr 2007 19:39:36 -0400
Local: Fri, Apr 6 2007 7:39 pm
Subject: Re: Is it possible to resize a tree row ?

Neil <n...@parkwaycc.co.uk> wrote:
> Igor Tandetnik wrote:

>> Removing and re-enabling XBL binding seems to force the tree to
>> recalculate its metrics based on whatever styles are effective at the
>> time.

> Actually anything that will recreate the tree body frame will do -
> hiding and showing the tree should work, I think.

If you mean just doing

var tree = document.getElementById(...);
tree.collapsed = true;
tree.collapsed = false;

then I just tried it, it doesn't work. Row height doesn't change.

Igor Tandetnik


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Deakin  
View profile  
 More options Apr 6 2007, 9:31 pm
Newsgroups: mozilla.dev.tech.xul
From: Neil Deakin <enndea...@sympatico.ca>
Date: Fri, 06 Apr 2007 21:31:38 -0400
Local: Fri, Apr 6 2007 9:31 pm
Subject: Re: Is it possible to resize a tree row ?

Collapsing an element doesn't remove the frame, it just sets the width
and height to 0. But if you set the hidden property it should do what
you want.

/ Neil


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe Charron  
View profile  
 More options Apr 7 2007, 5:30 am
Newsgroups: mozilla.dev.tech.xul
From: "Christophe Charron" <christophe.charron....@gmail.com>
Date: 7 Apr 2007 02:30:01 -0700
Local: Sat, Apr 7 2007 5:30 am
Subject: Re: Is it possible to resize a tree row ?
On 7 avr, 01:19, Neil <n...@parkwaycc.co.uk> wrote:
> Christophe Charron wrote:
> > Is there a way to use classes with treechildren::-moz-tree-row

> No. Each row in a tree is the same height.

I can understand that and i think it's a good way to build a tree. But
can different trees, in the same window, have different styles and
classes (i'm talking about moz-tree-row) ?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe Charron  
View profile  
 More options Apr 7 2007, 7:28 am
Newsgroups: mozilla.dev.tech.xul
From: "Christophe Charron" <christophe.charron....@gmail.com>
Date: 7 Apr 2007 04:28:21 -0700
Local: Sat, Apr 7 2007 7:28 am
Subject: Re: Is it possible to resize a tree row ?
On 7 avr, 11:30, "Christophe Charron"

<christophe.charron....@gmail.com> wrote:
> On 7 avr, 01:19, Neil <n...@parkwaycc.co.uk> wrote:> Christophe Charron wrote:
> > > Is there a way to use classes with treechildren::-moz-tree-row

> > No. Each row in a tree is the same height.

> I can understand that and i think it's a good way to build a tree. But
> can different trees, in the same window, have different styles and
> classes (i'm talking about moz-tree-row) ?

> > --
> > Warning: May contain traces of nuts.

Thanks to everybody : I managed what i wanted to do. You can see an
example here http://test03.christophe-charron.org/public/xul/2007_04_06/2007_04_06...
I just have a little problem with my "setTimeout" to allow a good
refresh and i hope i'll find my mistake but it works.
I still don't understand why 'Ctrl+" and "Ctrl-" don't change
treechildren font-size but ... nevermind...

--
Cordially,
Christophe Charron


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Igor Tandetnik  
View profile  
 More options Apr 9 2007, 11:56 am
Newsgroups: mozilla.dev.tech.xul
From: "Igor Tandetnik" <itandet...@mvps.org>
Date: Mon, 9 Apr 2007 11:56:50 -0400
Local: Mon, Apr 9 2007 11:56 am
Subject: Re: Is it possible to resize a tree row ?

It appears to only work if the element is "unhidden" asynchronously,
like this:

var tree = document.getElementById(...);
tree.setAttribute("hidden", "true");
window.setTimeout(function() {tree.removeAttribute("hidden");}, 0);

Unfortunately, this creates a pretty nasty flicker on the screen as a
side effect,especially if <tree> element occupies a significant area of
the window, as it does in my application. The binding technique I use
works synchronously and doesn't flicker as much.

Igor Tandetnik


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google