Syntax
PushButton HorizPos, VertPos, Width, Height, Label$ [, .Identifier]
Remarks
Creates a command button in a custom dialog box. When the command button is chosen, the Dialog() instruction that displays the dialog box (for example, button = Dialog(dlg)) returns a value corresponding to the relative order of that PushButton instruction among the other PushButton instructions: 1 for the first command button, 2 for the second, and so on.
Argument | Explanation |
HorizPos, VertPos | The horizontal and vertical distance of the upper-left corner of the command button from the upper-left corner of the dialog box, in increments of 1/8 and 1/12 of the System font (Windows) or the dialog font (Macintosh). |
Width, Height | The width and height of the command button, in increments of 1/8 and 1/12 of the System font (Windows) or the dialog font (Macintosh). |
Label$ | The label associated with the command button. An ampersand (&) precedes the character in Label$ that is the access key for choosing the command button. |
.Identifier | An optional identifier used by statements in a dialog function that act on the command button. If omitted, the default identifier is the first two words in Label$ (or the entire string if Label$ is only one word). You should specify .Identifier because the identifier you assign remains the same regardless of changes you make to Label$. |
Example
This example creates a command button with the text "Create Link," whose identifier is "Link." For an example of PushButton used in a complete dialog box definition, see Begin Dialog¼End Dialog.
PushButton 10, 54, 108, 21, "&Create Link", .Link
See Also
Begin Dialog¼End Dialog, CancelButton, OKButton, OptionButton