A simplification of what I want is in the code below.
The user selects your favorite fruit from the options apple, banana, other. Then, I want to enable/disable an EDIT field according to whether other was chosen in the drop down list, so the user may type his custom answer.
Any help would be much appreciated!
Code:
VERSION 15.0 POSITION . . 200 60 DIALOG main, label("Help") tabtitle("Main") BEGIN TEXT tx_fruit 10 10 120 ., label("Your favorite fruit is...") COMBOBOX cb_fruit @ +20 60 ., /// dropdownlist /// contents(fruit_list) /// onselchange(script main_cb_fruit_change) EDIT ed_fruit +60 @ 100 ., /// tooltip("For example: pear") END LIST fruit_list BEGIN apple banana other END SCRIPT main_cb_fruit_change BEGIN ***** HELP NEEDED: HOW TO CORRECT THE LINE BELOW? **** if main.cb_fruit == "other" { main.ed_fruit.enable } else { main.ed_fruit.disable } END OK ok1, label("OK") CANCEL can1, label("Cancel") RESET res1 PROGRAM command BEGIN put `"display "Thanks for the help""' END
0 Response to Dialog box script: if condition on chosen combo box value?
Post a Comment