Matt,

I tried your work around, and no luck.

I first did the code as you suggested, then I started looking at the
individual values used in the calculations, using the debugger with my
code:

var z2 = customerTree.calculateWidths();
var z3 = customerTree.width;
customerTree.maxHPosition = z2 - z3;

I was getting z2 to have a value of NaN, which gave maxHPosition of
NaN, which then did not give me any tree label text.

Andrew

--- In [email protected], Matt Chotin <[EMAIL PROTECTED]> wrote:
> This is a known issue I think but I can't find the note. You need
to have
> the Tree calculate the widths of the items in the Tree. You may
need to
> call this occasionally as you add new nodes.
> 
> 
> 
> myTree.maxHPosition = myTree.calculateWidths() - myTree.width;
> 
> 
> 
> The calculateWidths() method is potentially expensive since it scans
every
> node to figure out the widest one, so be aware.
> 
> 
> 
> Matt
> 
> _____ 
> 
> From: greenfishinwater [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 07, 2005 7:26 AM
> To: [email protected]
> Subject: [flexcoders] Tree hScrollPolicy not working as expected
> 
> 
> 
> 
> I have a tree which I build dynamically from a database, as each
node
> is opened. This works 100%. I have both hScrollPolicy and
> vScrollPolicy set to auto, but the horizontal scroll bars never
> appear. For some of my nodes at the bottom of the tree, the label is
> quite long, and the text is just truncated at the righthand edge of
> the tree.
> 
> When I set hScrollPolicy to on, the scrollbar appears from the very
> beginning, and the tree node can be scrolled to display the full
text. 
> 
> But I have noticed that when I set the tree width quite small
> (x="180") even though the horizontal scroll bar appears and works,
> some of the node label is truncated from the righthand edge. The
> smaller I make the width of the tree, the more the truncation
happens,
> even though the horizontal scroll bar is shown. It seems that it
only
> scrolls horizontally a fixed distance, which does not depend on the
> width of the label to be shown. The vertical scrollbar scrolls all
> the way regardless of the number of nodes displayed in the tree.
> 
> Any ideas?
> 
> Thank you
> 
> 
> 
> 
> 
> 
> 
> _____ 
> 
> Yahoo! Groups Links
> 
> *     To visit your group on the web, go to:
> http://groups.yahoo.com/group/flexcoders/
> <http://groups.yahoo.com/group/flexcoders/> 
> 
> *     To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> 
> 
> *     Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/> Terms of Service.





Reply via email to