Syntax |
OKButton X,Y,width,height [,.Identifier] |
|
Description |
Creates an button within a dialog box template. |
|
Comments |
This statement can only appear within a dialog box template (that is, between the Begin Dialog and End Dialog statements). The OKButton statement accepts 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. |
|
Identifier |
Name by which this control can be referenced by statements in a dialog function (such as DlgFocus and DlgEnable). |
|
If the DefaultButton parameter is not specified in the Dialog statement, the OK button will be used as the default button. In this case, the OK button can be selected by pressing Enter on a nonbutton control. A dialog box template must contain at least one OKButton, CancelButton, or PushButton statement (otherwise, the dialog box cannot be dismissed). |
|
Example |
This example shows how to use the OK and Cancel buttons within a dialog box template and how to detect which one closed the dialog box. Sub Main() |
|
See Also |
CancelButton (statement); CheckBox (statement); ComboBox (statement); Dialog (function); Dialog (statement); DropListBox (statement); GroupBox (statement); ListBox (statement); OptionButton (statement); OptionGroup (statement); Picture (statement); PushButton (statement); Text (statement); TextBox (statement); Begin Dialog (statement), PictureButton (statement). |
O |