BUTTON Mnemonic - Create a Push Button Control
Syntax
'BUTTON'(id,x,y,w,h,title,flags)
Description
The 'BUTTON' mnemonic creates a push button control for creating standard OK, Cancel, and Exit buttons.
Parameter |
Description |
||
id |
Control ID number. It must be an integer between 1 and 32767 and be unique within a given top-level window. |
||
x |
Horizontal position of the upper-left corner of the control in current units. |
||
y |
Vertical position of the upper-left corner of the control in current units. |
||
w |
Width of the control in current units. |
||
h |
Height of the control in current units. |
||
title |
Title of the control. Typing an '&' before a character in the title makes the title an accelerator. In BBj, and Visual PRO/5 5.01 or higher, the title is either ordinary text or BITMAP= followed by a path name, The BITMAP= syntax attempts to locate and load a bitmapped image from the specified file. Visual PRO/5 5.01 does not search the PREFIX for the image. Visual PRO/5 6.0 and higher does search the prefix for the image. Once successfully loaded, the image appears in the button. If not successfully loaded, an !ERROR=12 occurs. BBj supports various image formats including .png and .gif, which supports transparency. Transparency allows the underlying button to display through the transparent areas of an image so the image looks correct regardless of the color of the button. Visual PRO/5 supports .bmp image formats and uses the standard Windows rules for displaying bitmaps with colors that match the background. Also, Visual PRO/5 uses a standard Windows API call to convert all pixels in the bitmap of these colors to the appropriate colors defined by the Windows color scheme: |
||
|
Color Dark Gray Gray Light Gray |
RGB Value 128, 128, 128 192, 192, 192 223, 223, 223 |
WINDOWs Name COLOR_3DSHADOW COLOR_3DFACE COLOR_3DLIGHT |
flags |
Control flags, as follows: |
||
|
Flag Description |
||
|
$0001$ Sets the control to be initially disabled. |
||
|
$0010$ Sets the control to be initially invisible. |
||
|
$0800$ Draws a recessed client edge around the control. |
||
|
$1000$ Draws a raised edge around the control. |