Selected reflects the index of the selected combo box entry. The first entry has index 0.
Each element of array defines the contents of one entry in the combo box. None of the strings in array may be empty (if there is an empty string, all strings after and including that one will be dropped).
The optional statement is executed whenever the selection in the dlgComboBox changes.
Before the statement is executed, all variables that have been used with dialog objects
are updated to their current values, and any changes made to these variables inside the
statement will be reflected in the dialog when the statement returns.
If the initial value of Selected is outside the range of the array indexes, it is set to 0.
Example
string Colors[] = { "red", "green", "blue", "yellow" }; int Selected = 2; // initially selects "blue" dlgComboBox(Colors, Selected) dlgMessageBox("You have selected " + Colors[Selected]);
Index | Copyright © 2005 CadSoft Computer GmbH |