Flex 3 to Flex 4 migration tidbit: Enhanced Constraints
Flex 4 of course introduces the new line of Spark components that replace the Flex 3 based Halo ones - although you can use Halo and Spark containers/components together.
One interesting tidbit is that both Halo and Spark support the notion of constraints, which is an option you can use for visual layout, by being able to anchor visual components from the edges or center of containers. E.g.
That above example would anchor the button to the bottom right, regardless if the user resizes the browser.
However, as far as I know there's no Spark container that supports enhanced constraints. You would still use the mx:Canvas Halo container. E.g.:
<mx:constraintColumns>
<mx:ConstraintColumn id="col1" width="200"/>
<mx:ConstraintColumn id="col2" width="50" />
</mx:constraintColumns>
<s:Button label="Button 1" left="col1:0"/>
<s:Button label="Button 2" left="col2:0"/>
</mx:Canvas>













There are no comments for this entry.
[Add Comment]