Friday, October 8, 2010

Scrolling content in Flex 4



Source
In previous versions of Flex, every container had this functionality by 
default. While extremely convenient for the developer, it also meant that 
every container was burdened with this extra code even though it was 
hidden the vast majority of times. In Flex 4, you need to specifically
indicate when an area is scrollable. Tis is accomplished via a special 
tag named Scroller that wraps your Group tag.

   1:  <s:Scroller height="65">
   2:    <s:Group>
   3:     <s:layout>
   4:      <s:VerticalLayout/>
   5:    </s:layout>
   6:     <s:Button label="1"/>
   7:     <s:Button label="2"/>
   8:     <s:Button label="3"/>
   9:    </s:Group>
  10:  </s:Scroller>

No comments:

Blog Archive