PDA

View Full Version : How to add Children in Canvas?


krunalkakadia
07-02-2010, 11:06 AM
hi

i have Canvas. i want to add children in canvas?i have also other controls.

here is my code.

<mx:Canvas width="100%" height="100%" horizontalScrollPolicy="off" id="myCanvas">
<mx:VBox id="vbxTasksList" width="100%" height="100%">
<mx:Repeater id="lstTags" dataProvider="{TasksCollection}" >
<mx:HBox width="100%" horizontalAlign="left">
<mx:HBox width="85%" horizontalAlign="left" paddingLeft="0" paddingRight="0">
<mx:Label text="ProjectTagVO(lstTags.currentItem).TagName" truncateToFit="true" width="190" />
</mx:HBox>
<mx:HBox width="10%" paddingLeft="0">
<mx:Button id="btntasksDelete" toolTip="Click to delete"
styleName="imageMinus" width="14" height="14"
buttonMode="true" useHandCursor="true" mouseChildren="false"/>
</mx:HBox>
</mx:HBox>
</mx:Repeater>
</mx:VBox>
</mx:Canvas>

now i have arraycollection for repeater and add children into it.

[Bindable]
public var TasksCollection : ArrayCollection = new ArrayCollection();

so how can i do this?

pl reply

thanks in advance
kk

mojito
07-02-2010, 01:44 PM
does the canvas show anything ? , if not start to remove some of the more complicated items from the canvas ...for example the itemrenderer