2 Replies Latest reply on Nov 21, 2010 5:00 PM by ChrisInCambo2

    clipAndEnableScrolling when parent doesn't have fixed height

    ChrisInCambo2 Level 1

      Hi guys,

       

      I am having some problems with clipAndEnableScrolling, it works fine for VGroup when the parent has fixed height, but if the parent doesn't have a fixed height then it doesn't work and the content spills over. e.g:

       

                <s:TitleWindow width="500" height="500">

                    <s:VGroup width="100%">

                      <s:Group width="100%">

                        <!-- The content in here changes height based on the state, I won't complicate this example with the details -->

                      </s:Group>

                      <s:Group width="100%" clipAndEnableScrolling="true">

                              <s:Scroller height="100%" width="100%">
                                  <s:DataGroup dataProvider="{someData}" width="100%">

                                      <s:layout>
                                          <s:VerticalLayout gap="1"/>
                                      </s:layout>

                                  </s:DataGroup>

                              </s:Scroller>
                      </s:Group>

                   </s:VGroup>

                 </s:TitleWindow>

       

      This is a contrived example, but the point is that I don't know the hight of the first group ahead of time so can't set the height of the second group, also the component in reality is quite a lot more complex that the contrived example above so I don't want to have to perform any kind of gymnastics to calculate the heights of everything above the second Group.

       

      Can anyone tell me how to get a scrollbar on the second group?

       

      Cheers,

       

      Chris