Select to view content in your preferred language

verticalscrollbar always showing up in VBox

759
3
12-12-2011 08:12 AM
DebbieAlger
Deactivated User
Hi GUrus,

I have a VBox within a Box, I just want the VBox to have a verticalscrollbar and ONLY when it is needed, but it is always showing up???? any ideas.
BTW, I added the Canvas hoping it would help, but it didn't.

<mx:Box  width="300" height="300"  paddingLeft="10" paddingRight="10"   label ="Created Watersheds"   borderStyle="solid" borderVisible="true"   visible="{reportProvider !=null &amp;&amp; reportProvider.length>0}" >
 
   <s:Label id="txtDG"    paddingLeft="5" fontWeight="bold" text="Created Watersheds:"    />

  <mx:Canvas  width="90%" horizontalScrollPolicy="off"   verticalScrollPolicy="auto">
   <mx:VBox  borderStyle="solid" borderVisible="true"    borderColor="0xCCCCCC"   >    
    <s:Label    text=" "  />
    <mx:Repeater  dataProvider="{wsArray}"  id="wRepeater"  >
     <mx:HBox  horizontalScrollPolicy="auto"  verticalScrollPolicy="off">           
     
      <mx:Image  click="remove( event.currentTarget.getRepeaterItem().wsIndex, event.currentTarget.getRepeaterItem().wsName, event.currentTarget.getRepeaterItem().wsGraphicName, event.currentTarget.getRepeaterItem().wsPtGraphicName  )"   source="assets/images/delete_x.PNG"  width="20" height="20"  />
      <mx:Image    click="Export(event.currentTarget.getRepeaterItem().wsJobID, event.currentTarget.getRepeaterItem().wsName )" source="assets/images/export.png"  width="15" height="15" />       
      <s:Label   text="{wRepeater.currentItem.wsName}"  styleName="WidgetText" fontSize="14"    />
     
     </mx:HBox>
   </mx:VBox>
  </mx:Canvas>
 
</mx:Box>

thanks,
Tags (2)
0 Kudos
3 Replies
YungKaiChin
Regular Contributor
Is your VBox larger than the Canvas?
0 Kudos
DebbieAlger
Deactivated User
there is no size set at all on the VBox, just the Canvas. I tried setting a size smaller in the VBox but it didn't help.
0 Kudos
DebbieAlger
Deactivated User
I figured it out, the box with the verticalscrollbar has to have a specified size that is larger than the
parent, I put height of 100% for the parent, then a larger size for the scroll box.

thanks for your help in direction
0 Kudos