2010-11-21 19 views
1

clipAndEnableScrolling ile ilgili bazı sorunlar yaşıyorum, ebeveynin sabit yüksekliği olduğunda VGroup için iyi çalışıyor, ancak ebeveyn sabit bir yüksekliğe sahip değilse, işe yaramıyor ve içerik dökülüyor. örneğin:clipAndEnableAşağı sabit yüksekliğe sahip değilken gezinme?

 <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> 

Bu zoraki bir örnektir, ama mesele ben de bileşen, ikinci grubun yüksekliğini ayarlamak olamaz vaktinden ilk grup yüksekliklerinde biliyor kalmamasıdır Gerçekte, yukarıda tartışılan örnekte çok daha karmaşıktır, bu yüzden ikinci grubun üzerindeki her şeyin yüksekliğini hesaplamak için herhangi bir cimnastik yapmak zorunda kalmak istemiyorum.

İkinci grupta nasıl bir kaydırma çubuğu elde edeceğimi söyleyen var mı?

Alkış,

Chris

cevap

0

Eğer kaydırma içine grubunuzu koyun bu

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

     <s:VGroup width="100%" height="100%"> 

     <s:Group width="100%" height="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%" height="100%" clipAndEnableScrolling="true"> 

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

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

        </s:DataGroup> 

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

    </s:VGroup> 

    </s:TitleWindow> 
0

gibi, tüm gruplar üzerinde% 100'e şey yüksekliğini ayarlamayı deneyin Can.

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

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

       </s:DataGroup> 

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

İlgili konular