Highlighted

Drop-downs contingent on selection question

Avatar

Guest

23-01-2009

I'm trying to make drop-down boxes contingent upon each other. For example: The first box would include color, shape. And depending on which you selected, the second box would either include colors or shapes. Does anyone have any idea how to do this?

Replies

Highlighted

pguerett

26-01-2009

You will have to write code to do this. To get the value of the 1st dropdown use DropDownName.rawValue. Write your code on the exit event as the value will not be committed until you exit. Then you can use the DropDownName.addItem(value, value) to populate the dropdown. You will have to add the items one at a time. The 1st value is the value that the user will see in the dropdown. The 2nd value is the one that will be submitted when data is set out of the form. If you want them to be the same only use a single value.