4 Replies Latest reply on May 12, 2010 3:40 AM by TeotiGraphix

    VBox cannot scroll

    phil1943 Level 1

      hello, I have a VBox within a Tab navigator.

      I am adding children dynamically to the VBox, however the VBox will not scroll to display the children when they overlap.

      Has anyone any ideas to get this VBox scrolling ?


      Thanks for any help.

        • 1. Re: VBox cannot scroll
          Cesare Rocchi Level 2

          can you post some code?

          • 2. Re: VBox cannot scroll
            FinFlex Level 1

            I'm facing the same problem here! I have VDividerBox as a parent container of which have VBox as a children container. Inside the VBox i have repeater which repeats canvas by its content. When I change the state, VBox size is changed when vertical scrollbar disaopears. When I get back to default state, scrolls are still missing. Again if I change current state when I resize VBox height, scroll comes back randomly.



            <mx:Panel layout="absolute" styleName="commentPanel" title="Comments" color="#000000" id="pnlComments" right="10" left="5" titleIcon="@Embed(source='images/message.png')" verticalScrollPolicy="off" horizontalScrollPolicy="off" borderColor="#B7BABC" borderStyle="solid" cornerRadius="0" top="10" bottom="10" borderThickness="1" dropShadowEnabled="false">
                                                            <mx:VDividedBox top="40" id="vdvComments" verticalScrollPolicy="auto" bottom="0" left="0" right="0">
                                                                <mx:VBox width="100%" height="100%" id="hbComments" borderStyle="solid" verticalGap="0" x="0" y="15" verticalScrollPolicy="auto" minWidth="0" minHeight="0">
                                                                    <mx:Repeater id="commentsRepeater" dataProvider="{issueCommentsCollection}">
                                                                        <control:SupportCommentRenderer details="{commentsRepeater.currentItem.details}" first_name="{commentsRepeater.currentItem.first_name}" last_name="{commentsRepeater.currentItem.last_name}"
                                                                            created_date="{commentsRepeater.currentItem.created_date}" organization_desc="{commentsRepeater.currentItem.organization_desc}" phone="{commentsRepeater.currentItem.phone}"/>
                                                            <mx:Canvas y="10" height="22" left="0" right="0" id="cvCommentButtonBar">
                                                                <mx:Button x="0" y="0" label="New Comment" id="lbtnCommentStateToggle" click="lbtnCommentStateToggle_OnClick(event);" toolTip="Write new comment" icon="@Embed(source='images/CommentHS.png')"/>
                                                                <mx:Label id="lblCommentsCount" y="2" right="0"/>


            • 3. Re: VBox cannot scroll
              TeotiGraphix Level 3



              When in doubt with mx containers, set the minHeight="0". By doing this it will basically allow the VBox to "collapse" there by showing it's vertical scroll bars. If you don't do this it's parent the TabNavigator will use it's measuredHeight, which is all the child dimensions added together instead of the TabNavigator's viewable height.



              • 4. Re: VBox cannot scroll
                FinFlex Level 1

                This solved my problem. Works like a charm! Thank you!