4 Replies Latest reply on Jun 18, 2008 1:58 AM by SWiiT

    Change textField label that is dynamic.

    SWiiT
      Hi!
      I have created from a xml some textfield and combobox that is working good.
      Now the problem is how i can access the items?
      If i want to change label or text on ex. TextInput with name=username.

      Some of the code is looking like this.
      This is in a for each loop.

      -------------------------------------------------
      var fieldLabel:String = heading.@label; (this is from the xml)
      var obj:FormItem = new FormItem();
      var textField:TextInput = new TextInput();
      textField.name = "col"+i;
      textField.id = fieldLabel;
      obj.addChild(textField);
      userForm.addChild(obj); (userForm is the form i have created)

      -------------------------------------------------

      I have tried to write
      col1.text = "the new text";
      but it say that col1 is undefined property.

      How can i do?