i'm down to one problem. how can i supress the horizontalScrollBar from appearing.
btw. the answer to problem 2 was hbox1.horizontalScrollPosition = hbox1.maxWidth;//not hbox1.width --- In flexcoders@yahoogroups.com, "bhaq1972" <[EMAIL PROTECTED]> wrote: > > I've modified my code to give me nearly what i want. > > Problems > 1) if you keep clicking the 'Add' button (to create more viewstack > children), the horizontal scroll bar appears after viewstack child9. > how do i get rid of it? > > 2) my horizontalScrollPosition for the linkbar hbox is always to the > right edge ie > > hbox1.horizontalScrollPosition = hbox1.width; > > this works upto viewstack child 15. after that it no longer works. > any ideas? > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> > > <mx:Script> > <![CDATA[ > import mx.containers.VBox; > > private var iCount:int = 4; > > private function addStuff():void > { > iCount++; > var vbox1:VBox = new VBox(); > vbox1.label = "screen"+iCount; > vs1.addChild(vbox1); > > if(hbox1.horizontalScrollBar) > { > hbox1.horizontalScrollBar.visible = false; > } > hbox1.horizontalScrollPosition = hbox1.width; > } > > ]]> > </mx:Script> > > <mx:Panel id="panel1" title="Click on 'Add' to add more > links/viewstack children" height="100%" minWidth="0" width="100%" > horizontalScrollPolicy="off"> > <mx:HBox width="100%"> > <mx:Button label="Add" click="addStuff()"/> > <mx:HBox id="hbox1" minWidth="0" width="70%" > > > <mx:LinkBar id="linkbar1" > color="#0000FF" fontWeight="bold" minWidth="0" dataProvider="vs1" /> > </mx:HBox> > <mx:Button label="LinkBar End Point"/> > </mx:HBox> > > <mx:ViewStack id="vs1"> > <mx:VBox label="screen1"/> > <mx:VBox label="screen2"/> > <mx:VBox label="screen3"/> > <mx:VBox label="screen4"/> > </mx:ViewStack> > > </mx:Panel> > > </mx:Application> > > > > > > > > > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "bhaq1972" <mbhaque@> wrote: > > > > I have a linkbar and a viewstack. I have limited width for the > > Linkbar. > > > > I have 2 issues someone may be able to help me on. > > > > 1) as more links are added to the link bar, i want to be able to > see > > the end linkbuttons (if this was possible, i would do this > > linkbar.horizontalHorizontalPosition = > > linkbar.maxHorizontalPosition). > > > > 2) In the example below i want to able to move the linkbar left or > > right using the 2 buttons either side of it. > > > > any help would be appreciated > > bod (bhaq1972) > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> > > > > <mx:Script> > > <![CDATA[ > > import mx.containers.VBox; > > > > private var iCount:int = 4; > > > > private function addStuff():void > > { > > iCount++; > > var vbox1:VBox = new VBox(); > > vbox1.label = "screen"+iCount; > > vs1.addChild(vbox1); > > } > > ]]> > > </mx:Script> > > > > <mx:Panel id="panel1" title="Click on 'Add' to add more > > links/viewstack children" height="100%" minWidth="0" width="100%" > > horizontalScrollPolicy="off"> > > <mx:HBox width="100%"> > > <mx:Button label="Add" click="addStuff()"/> > > <mx:Button label="<" width="20"/> > > <mx:LinkBar id="linkbar1" color="#0000FF" > > fontWeight="bold" width="70%" minWidth="0" dataProvider="vs1" /> > > <mx:Button label=">" width="20"/> > > </mx:HBox> > > > > <mx:ViewStack id="vs1"> > > <mx:VBox label="screen1"/> > > <mx:VBox label="screen2"/> > > <mx:VBox label="screen3"/> > > <mx:VBox label="screen4"/> > > > > </mx:ViewStack> > > > > </mx:Panel> > > > > </mx:Application> > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Get to your groups with one click. Know instantly when new email arrives http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/