Workbench User Guide : 6. Creating and Using Basic Fields : Scalar Fields : Create a Button Field
 
Share this page                  
Create a Button Field
A button field is represented as a rectangle that the user clicks to initiate an operation. Such buttons are commonly called push buttons or command buttons. In the Property Inspector, you can specify either text or an image as the label for the button.
Note:  You can create Alt speed keys for button fields. For more information, see How You Can Define an Alt Speed Key. For information about using buttons on portable forms, see the Programming Guide.
To create a button field
1. Open your frame in the Frame Editor (see Open an Existing Frame).
2. Select the Button Field icon on the field palette.
3. Position and size the button field.
4. Set the properties for the button field.
For complete descriptions of each field property, see Button Field Properties and Common Field Properties.
Button Field Properties
All the properties for button fields are described under Common Field Properties, with the exception of the following properties that are specific to the button field type:
BitmapLabel
Specifies a file containing the image to be displayed as the button label. When you click this button, a standard File Selection dialog appears. Enter the directory path of the new image you want to use.
Default: No Bitmap
IsAutoSized
Specifies whether the button field is forced to ignore its Height and Width property values and resize itself to fit the current text label (in the current font). If the text is changed, the button is resized accordingly. Possible values are:
TRUE
Specifies that the field is auto-sized
FALSE
Specifies that the field uses its Height and Width property values
TextAlignment
Specifies the alignment for a button's text label. Valid options are:
ALIGN_LEFT
ALIGN_RIGHT
ALIGN_TOP
ALIGN_BOTTOM
ALIGN_CENTER
Default: ALIGN_CENTER
TextLabel
Specifies the text for a button label
Default: “Button”