Hi All

How to use constraint rows and columns in a nested canvas ?
constraint rows and column work when canvas is not nested

This Example works
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>

<mx:Canvas id="myCanvas" backgroundColor="0x6699FF">

<mx:constraintColumns>
<mx:ConstraintColumn id="col1" width="100"/>
<mx:ConstraintColumn id="col2" width="100"/>
</mx:constraintColumns>
<mx:constraintRows>
<mx:ConstraintRow id="row1" height="100"/>
<mx:ConstraintRow id="row2" height="100"/>
</mx:constraintRows>

<mx:Button label="Button 1"
top="row1:10" bottom="row1:10"
left="10"/>
<mx:Button label="Button 2"
left="col2:10" right="col2:10"/>
<mx:Button label="Button 3"
top="row2:10" bottom="row2:10"
left="col1:10" right="10"/>
</mx:Canvas>

<mx:Label text="canvas width:{myCanvas.width}"/>
<mx:Label text="canvas height:{myCanvas.height}"/>
</mx:Application>

But this does not work
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>

<mx:Canvas id="myCanvas" backgroundColor="0x6699FF">
<mx:Canvas >
<mx:constraintColumns>
<mx:ConstraintColumn id="col1" width="100"/>
<mx:ConstraintColumn id="col2" width="100"/>
</mx:constraintColumns>
<mx:constraintRows>
<mx:ConstraintRow id="row1" height="100"/>
<mx:ConstraintRow id="row2" height="100"/>
</mx:constraintRows>

<mx:Button label="Button 1"
top="row1:10" bottom="row1:10"
left="10"/>
<mx:Button label="Button 2"
left="col2:10" right="col2:10"/>
<mx:Button label="Button 3"
top="row2:10" bottom="row2:10"
left="col1:10" right="10"/>
</mx:Canvas>
</mx:Canvas>
<mx:Label text="canvas width:{myCanvas.width}"/>
<mx:Label text="canvas height:{myCanvas.height}"/>
</mx:Application>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to