EAGLE Help Light

dlgComboBox

Funkce
Defines a combo box selection field.

Zápis
dlgComboBox(string array[], int &Selected) [ statement ]

Description
The dlgComboBox statement defines a combo box selection field with the contents of the given array.

Selected reflects the index of the selected combo box entry. The first entry has index 0.

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.

Viz také dlgListBox, dlgLabel, Layout Information, A Complete Example

Příklad


string Colors[] = { "red", "green", "blue", "yellow" };
int Selected = 2; // initially selects "blue"
dlgComboBox(Colors, Selected) dlgMessageBox("You have selected " + Colors[Selected]);


OBSAH Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH