Hi Mark, Try this à <mx:Accordion id="inputDetail"
height="100%" width="100%" creationComplete="addStuff(query.input)"> import
mx.controls.Label; import
mx.controls.TextArea; import
mx.controls.VBox; function addStuff(elements) { var type:String
= elements[i].type; var vbox = VBox(inputDetail.createSegment(VBox,
element, element, undefined)); var newLabel = Label(vbox.createChild(Label,
undefined, "Some Data")); } } From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Wales Hello, I am trying to dynamically/conditionally add children to a
set of dynamically/conditionally created Accordion segments. At present, I create the segments I
want using a loop over my array: <mx:Accordion
id="inputDetail" height="100%" width="100%" creationComplete="addStuff(query.input)"> function addStuff(elements) { var type:String
= elements[i].type; var vbox =
inputDetail.createSegment(mx.containers.VBox, element, element, undefined); var newLabel =
vbox.createChild(mx.controls.Label, undefined, "Some Data"); } } The createChild function does not yield any results. Does
anyone have any suggestions? Thanks, -Mark
|
Title: Message