Syntax |
PushButton X,Y,width,height,title$ [,.Identifier] |
|
Description |
Defines a push button within a dialog box template. |
|
Comments |
Choosing a push button causes the dialog box to close (unless the dialog function redefines this behavior). This statement can only appear within a dialog box template (that is, between the Begin Dialog and End Dialog statements). The PushButton 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. |
|
title$ |
String containing the text that appears within the push button. This text may contain an ampersand character to denote an accelerator letter, such as "&Save" for Save. |
|
.Identifier |
Name by which this control can be referenced by statements in a dialog function (such as DlgFocus and DlgEnable). |
|
If a push button is the default button, it 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 creates a bunch of push buttons and displays which button was pushed. Sub Main() |
|
See Also |
CancelButton (statement); CheckBox (statement); ComboBox (statement); Dialog (function); Dialog (statement); DropListBox (statement); GroupBox (statement); ListBox (statement); OKButton (statement); OptionButton (statement); OptionGroup (statement); Picture (statement); Text (statement); TextBox (statement); Begin Dialog (statement), PictureButton (statement); DlgSetPicture (statement). |
|
Note |
Accelerators are underlined, and the accelerator combination Alt+letter is used. |
P |