Syntax |
ComboBox X,Y,width,height,ArrayVariable,.Identifier |
|
Description |
This statement defines a combo box within a dialog box template. |
|
Comments |
When the dialog box is invoked, the combo box will be filled with the elements from the specified array variable. This statement can only appear within a dialog box template (i.e., between the Begin Dialog and End Dialog statements). The ComboBox statement requires the following parameters: |
|
|
Parameter |
Description |
|
X, Y |
Integer coordinates specifying the position of the control (in dialog units) relative to the upper left corner of the dialog box. |
|
width, height |
Integer coordinates specifying the dimensions of the control in dialog units. |
|
ArrayVariable |
Single-dimensioned array used to initialize the elements of the combo box. If this array has no dimensions, then the combo box will be initialized with no elements. A runtime error results if the specified array contains more than one dimension. ArrayVariable can specify an array of any fundamental data type (structures are not allowed). Null and Empty values are treated as zero-length strings. |
|
Identifier |
Name by which this control can be referenced by statements in a dialog function (such as DlgFocus and DlgEnable). This parameter also creates a string variable whose value corresponds to the content of the edit field of the combo box. This variable can be accessed using the syntax: DialogVariable.Identifier |
|
When the dialog box is invoked, the elements from ArrayVariable are placed into the combo box. The .Identifier variable defines the initial content of the edit field of the combo box. When the dialog box is dismissed, the .Identifier variable is updated to contain the current value of the edit field. |
|
Example |
This example creates a dialog box that allows the user to select a day of the week. Sub Main() Dim days$(6) |
|
See Also |
CancelButton (statement); CheckBox (statement); Dialog (function); Dialog (statement); DropListBox (statement); GroupBox (statement); ListBox (statement); OKButton (statement); OptionButton (statement); OptionGroup (statement); Picture (statement); PushButton (statement); Text (statement); TextBox (statement); Begin Dialog (statement), PictureButton (statement). |
C |