BUTTON
Instructions Properties Methods Events Notes Examples
The BUTTON instruction defines an object variable for a push button. Users click BUTTON objects to begin, interrupt, or end a process. When chosen, a BUTTON appears pushed in and so is sometimes called a push button. The BUTTON face may contain text or an image. To define a BUTTON, use one of the following statement formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Label.
%
Optional. Denotes the item as being GLOBAL.
arraysize
Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.
^
Optional. Denotes the item as being a POINTER.
target
Required. The name of a previously defined data item of the same type.
Flags Affected: NONE
Object instructions are PL/B verbs that support the graphical objects.
|
Makes an object visible and allows the user to interact with it. | |
|
Tests whether a property is valid. | |
|
Creates all necessary data structures for an object. | |
|
Hides the object from the user. | |
|
Release the data structures obtained for an object. | |
|
Prevents user interaction. | |
|
Turns on or off the capability of moving object or moving an item in an object. | |
|
Allows user interaction. | |
|
Associates an event with a program execution label. | |
|
Sends an event to a specified object. | |
|
Obtain the value of an object item. | |
|
Obtain the value of a specific property. | |
|
Removes an object from a COLLECTION. | |
|
Inserts an object into a COLLECTION. | |
|
Changes the current focus. | |
|
Set the value of an object item. | |
|
Set the value of a specific property. |
Properties are attributes of an object that define the object's characteristics or its behavior.
|
Ties an object to one or more edges of its parent object. | |
|
Defines the appearance. | |
|
Defines the Bootstrap 5 appearance. | |
|
Defines the type of button as standard, split, command link, or file input. | |
|
Escape key triggers a Click event. | |
|
Focus will trigger the Validate event | |
|
Defines text associated with a command link. | |
|
Defines the BootStrap 5 context style. | |
|
Enter key triggers a Click event. | |
|
Defines which borders are docked to its parent and determines how it is resized. | |
|
Defines the object's ability to receive drop actions. | |
|
Defines if user interaction is allowed. | |
|
Associates a FLOATMENU object. | |
|
Identifies the text font. | |
|
Defines the height of an object. | |
|
Associates a topic number as defined in a user generated Windows help file. | |
|
Associates a help keyword string as defined in a user generated Windows help file | |
|
Returns Windows handle for an object. | |
|
Allows use of an image in place of the text. | |
|
Defines the left position of an object. | |
|
User defined identification number. | |
|
Allows use of a picture in place of the text. | |
|
Defines the run-time name of the object. | |
|
Specifies if an elevation icon should be shown. | |
|
Defines the location in the tabbing sequence. | |
|
Windows application visual style theme. | |
|
Defines text associated with an object. | |
|
Specifies a string to be displayed in a tool tip. | |
|
Returns the tool tip window handle. | |
|
Define the top position of an object. | |
|
Allows application data to be assigned. | |
|
Specifies whether an object is visible or hidden. | |
|
Specifies a HTML class name. | |
|
Specifies the CSS height property. | |
|
Specifies the CSS left property. | |
|
Specifies that an object should be created as a web object. | |
|
Specifies the CSS position property. | |
|
Specifies a list of CSS properties. | |
|
Specifies the CSS top property. | |
|
Specifies the CSS width property. | |
|
Defined the height of an object. | |
|
Defines the z-order of an object. |
Methods are encapsulated routines that act upon an object.
|
Adds one or more HTML classes. | |
|
Disable one or more jQuery events. | |
|
Enable one or more jQuery events. | |
|
Obtains the HTML id attrbute. | |
|
Retrieves a specific CSS style. | |
|
Removes one or more HTML classes. | |
|
Sets a specific CSS style. |
|
Allow a click action to cancel an AFILE read that is active. | |
|
Retrieves the number of files that have been selected | |
|
Retrieves the file names that have been selected. | |
|
Allow a click action to cancel a FILE, AFILE, or IFILE READ that is active. | |
|
Sets the specific options used by the client browser File Upload selection dialog. |
Events are actions recognized by an object for which you can write code to respond. Events can occur as a result of a user action or program code, or they can be triggered by the system.
|
Occurs when the contents or value of an object is altered. | |
|
Occurs when the mouse button is pressed and released over an object. | |
|
Occurs when a drag-and-drop operation is in progress and the mouse button is released. | |
|
Occurs when a drag-and-drop operation is in progress and the mouse cursor is moved over an object. | |
|
Occurs when an object gains keyboard focus. | |
|
Occurs when an object has the keyboard focus and the user presses and releases a key. | |
|
Occurs when an object loses keyboard focus. | |
|
Occurs when the user presses a mouse button over an object. | |
|
Occurs when the user moves the mouse over an object. | |
|
Occurs when the user releases a mouse button over an object. | |
|
Occurs when an object is relocated. | |
|
Occurs when the focus leaves an object as a result of a user action and the new focus has its CAUSEVALID property set. |
A BUTTON contains only one item accessible through SETITEM. It is the push button.
The BUTTON is always referenced as item number zero for SETITEM and GETITEM instructions.
The text displayed on a BUTTON is specified when the button is CREATEd. Subsequently, it may be modified or retrieved using the SETITEM and GETITEM instructions. If a Null String is specified, no text is displayed on the BUTTON.
The text associated with a BUTTON may include an Alt Keyboard Sequence.
An icon or picture may be displayed on a BUTTON in place of the text. To add an icon to a BUTTON, use the ICON property. Pictures are added using the PICTURE property. Any text associated with the BUTTON is still available and any Alt Keyboard Sequence defined is still active.
To allow the user to choose a BUTTON by pressing the enter key, set the DEFAULT property to $ON. Only one button per window may be designated as the DEFAULT button.
To allow the user to choose a BUTTON by pressing the escape key, set the CANCEL property to $ON. Only one button per window may be designated as the CANCEL button.
Multi-dimension arrays of BUTTONS are supported up to a maximum of fourteen dimensions.
The ^ denotes a Pointer Variable to a BUTTON object.
Although a BUTTON may be defined as Global, it is DESTROYed during a CHAIN instruction.
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
This example creates three BUTTONs on the screen. Button 2 is displayed containing the icon specified by resource number 10020. Button 3 is displayed containing the image specified by "stop-up.bmp". When 'Button 1' or 'Button
2' is clicked, a message is displayed on the screen. When the Button 3 is clicked, the program is terminated.
See Also: Object Definitions, Object Output Instructions, Method Syntax,
![]() |