2 Replies Latest reply on Jan 21, 2007 7:22 AM by RalphGilman

    AdvicePls on Addressing ChildObj in VBox

    RalphGilman
      I'm new to Flex ,creating a demo, and appreciate any help with following:

      I'm creating multiple Model Objects in an Input Accordion area.
      I am then 1) creating a HTML formatted string of text for each inputObj
      (that's used as visual display for user),
      2) programmably putting this string as HTMLText into a TextArea object
      (to maintain formatting),
      3) adding the TextArea to a VBox display using addChild method
      (also saving the model object properties in a separate ArrayCollection)

      All above seems to work.

      I now want to click to select a TextArea childObject in the VBox, get an Index
      and use the index - to either delete or edit the object.

      So, how do I determine what VBox childObject was selected (clicked)?
      There is no "selectedItem" type function in VBox objects.
      Issue seems to be that VBox itself has no ArrayCollection of objects,
      even though I can add children programmatically.

      If I use a List object (does have collection), I loose the HTML formatting of the text (?options?)
      I could use a Repeater within the VBox, but can update only thru a bindable
      dataProvider - and I don't know how to update programmatically as I'm
      doing now by programmatically adding new TextArea's to the VBox.

      Two possibilities??
      1. use List object and learn how to format text.
      2. create an ArrayCollection of text and use as provider to a Repeater?

      Should be an easier way. Thanks -