Create both constraint columns and rows
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Canvas width="100%" height="100%">
<mx:constraintColumns>
<mx:ConstraintColumn id="col1" width="100" />
</mx:constraintColumns>
<mx:constraintRows>
<mx:ConstraintRow id="row1" height="50" />
<mx:ConstraintRow id="row2" height="50" />
</mx:constraintRows>
<mx:Button label="Button 1" left="col1:0" right="col1:0" top="row1:0" bottom="row1:0" />
<mx:Button label="Button 2" left="col1:10" right="col1:10" top="row2:0" bottom="row2:0" />
</mx:Canvas>
</mx:Application>
Related examples in the same category