PDA

View Full Version : How to display horizontal scrollbar for tree component


advika
12-28-2006, 01:07 PM
Hi
I am using tree component,
if my content height is more, i am getting vertical scrollbar,
but i could not get horizontal scrollbar if the contents width is more than the tree component width.
how to display horizontal scrollbar

even if i have used following code
treeMenu.List.hScrollPolicy="on"
still it is not displaying horizontal scrollbar

please tell me how to do this

thanks in advance

Regards
Advika

Mazoonist
12-28-2006, 08:31 PM
Hey, advika,

First, let me say I'm basically intermediate with Flash, and have just a little bit of experience with components. So, while I'm not an expert (yet!), I enjoy tinkering around and trying to find the answers to questions like yours.

It appears that even though you set hScrollPolicy to "on", you still need to set the maxHPosition property also. In a new Flash document, I dragged out a tree component, called it myTree, and the following code produced a horizontal scroll bar:
//long sentence that's wider than the component:
myTree.addItem("Now is the time for all good men to come to the aid of their country.");
myTree.maxHPosition = 200; //a width that's wide enough to accomodate the long sentence.
myTree.hScrollPolicy = "on";
myTree.vScrollPolicy = "auto";

advika
12-29-2006, 08:34 AM
Hi Mazoonist,

Thanks for reply,
it is working fine.

Regards
Advika