PDA

View Full Version : Scrollbars


ripvtech
11-07-2006, 03:40 PM
I have a viewstack with resizeToContent="true"

My problem is when the the stack resizes and the right scroll bar apears I want it to auto adjust the width so the horizontal scroll bar does not show.

Oh yeah, and I'm an absolute newbie to actionscript :-\

Thanks,
JD

meddlingwithfir
11-07-2006, 04:50 PM
Could you post the code you're using?

ripvtech
11-07-2006, 05:52 PM
Here is the basic outline of the code, I had to remove the actual fields.



<mx:ViewStack id="viewstack1" horizontalCenter="0" resizeToContent="true" height="500" top="42">

<mx:Canvas label="Information" width="800" height="100%">
<mx:Canvas width="50%" left="0" top="0" bottom="0">


*bunch of crap here


</mx:Canvas>
<mx:Canvas width="50%" right="0" top="0" bottom="0">


*bunch of crap here

</mx:Canvas>
</mx:Canvas>

<mx:Canvas label="Section 2" width="100%" height="100%" >
*more crap

</mx:Canvas>

<mx:Canvas label="Section 3" width="100%" height="100%" >
*more crap

</mx:Canvas>




Thanks,
JD

meddlingwithfir
11-07-2006, 07:57 PM
Hmm - this may be a bit out of my league. I set up some test code to see if I could replicate what's happening to you, but it doesn't seem to even give me a scrollbar:


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[

[Bindable] private var myText:String = "Reference to the item that is being processed in the dataProvider property. This property changes as the Repeater component executes, and is null after the execution is complete. It is a read-only property that you cannot set in the <mx:Repeater> tag. After a Repeater component finishes repeating, you do not use the currentItem property to get the current item. Instead, you call the getRepeaterItem() method of the repeated component itself. For more information, see Event handlers in Repeater components. Reference to the item that is being processed in the dataProvider property. This property changes as the Repeater component executes, and is null after the execution is complete. It is a read-only property that you cannot set in the <mx:Repeater> tag. After a Repeater component finishes repeating, you do not use the currentItem property to get the current item. Instead, you call the getRepeaterItem() method of the repeated component itself. For more information, see Event handlers in Repeater components. Reference to the item that is being processed in the dataProvider property. This property changes as the Repeater component executes, and is null after the execution is complete. It is a read-only property that you cannot set in the <mx:Repeater> tag. After a Repeater component finishes repeating, you do not use the currentItem property to get the current item. Instead, you call the getRepeaterItem() method of the repeated component itself. For more information, see Event handlers in Repeater components. Reference to the item that is being processed in the dataProvider property. This property changes as the Repeater component executes, and is null after the execution is complete. It is a read-only property that you cannot set in the <mx:Repeater> tag. After a Repeater component finishes repeating, you do not use the currentItem property to get the current item. Instead, you call the getRepeaterItem() method of the repeated component itself. For more information, see Event handlers in Repeater components. Reference to the item that is being processed in the dataProvider property. This property changes as the Repeater component executes, and is null after the execution is complete. It is a read-only property that you cannot set in the <mx:Repeater> tag. After a Repeater component finishes repeating, you do not use the currentItem property to get the current item. Instead, you call the getRepeaterItem() method of the repeated component itself. For more information, see Event handlers in Repeater components. "
]]>
</mx:Script>

<mx:ViewStack id="viewstack1" horizontalCenter="0" resizeToContent="true" height="500" top="42">

<mx:Canvas label="Information" width="800" height="100%">
<mx:Canvas width="50%" left="0" top="0" bottom="0">
<mx:Text text="{myText}" width="100%" height="100%"/>
</mx:Canvas>
<mx:Canvas width="50%" right="0" top="0" bottom="0">
<mx:Text text="{myText}" width="100%" height="100%"/>
</mx:Canvas>
</mx:Canvas>

<mx:Canvas label="Section 2" width="100%" height="100%" >
<mx:Text text="{myText}" width="100%" height="100%"/>
</mx:Canvas>

<mx:Canvas label="Section 3" width="100%" height="100%" >
<mx:Text text="{myText}" width="100%" height="100%"/>
</mx:Canvas>
</mx:ViewStack>
</mx:Application>



My thought was to put so much text in the Text tag that it would create a scrollbar... but that didn't happen.

ripvtech
11-08-2006, 01:30 PM
I have about 50 - 100 fields on each page, there form creating the vertical scroll bars.