FORUM

Combobox Component Help - DropDown Menu - removeItem

Home / Forum / Components Discussions / Combobox Component Help - DropDown Menu - removeItem

TAGS combobox help

Started 2 years ago by ka08

Last reply by ka08

Recent posts in this topic

  • Can someone help me figure out the coding to my combobox problem please?

    Basically, I have three comboboxes with different drop-down menus. When one item is selected on “myCombobox2”, I want another item on ”myCombobox3”. Below is some of my current code for the project.

    myCombobox2.dropdown.setRendererStyle("textFormat", myTextFormat);
    myCombobox2.textField.setStyle("textFormat", myTextFormat);
    myCombobox2.dropdown.rowHeight = 30;
    myCombobox2.prompt = "Select";
    myCombobox2.addItem({label:"Green", text:"green"})
    myCombobox2.addItem({label:"Blue", text:"blue"})
    myCombobox2.addItem({label:"Purple", text:"purple"})
    myCombobox2.addItem({label:"Red", text:"red"})

    myCombobox3.dropdown.setRendererStyle("textFormat", myTextFormat);
    myCombobox3.textField.setStyle("textFormat", myTextFormat);
    myCombobox3.dropdown.rowHeight = 30;
    myCombobox3.prompt = "Select";
    myCombobox3.addItem({label:"Sweatshirt", text:"sweatshirt"})
    myCombobox3.addItem({label:"T-shirt", text:"t-shirt"})
    myCombobox3.addItem({label:"Pants", text:"pants"})
    myCombobox3.addItem({label:"Shoes", text:"shoes"})
    myCombobox3.addItem({label:"Sweater", text:"Sweater"})

    How do I create code that says when “Green” has been selected, delete the “Sweater” option from “myCombobox3.” I also need “Sweater” to disappear when “Purple” has been selected.

    Any help would be greatly appreciated.

    Thanks!


    #  /  posted on Oct 27, 2009

Please login to post replies.