ZButton

(Engine-Level Function)

Description: Draws a layered button in a window and returns true when selected.
Returns: Boolean
Usage: Steady State only.
Function Groups: Graphics
Related to: GUIButton
Format:  ZButton(Left, Bottom, Right, Top, Label, FocusID [, Font])
Parameters:  
Left  
Required. Any numeric expression for the left side coordinate of the button.
Bottom  
Required. Any numeric expression for the bottom side coordinate of the button.
Right  
Required. Any numeric expression for the right side coordinate of the button.
Top  
Required. Any numeric expression for the top side coordinate of the button.
Label  
Required. Any text expression for the button label. Will not display tab characters.
FocusID  

Required. Any numeric expression from 0 to 32767 for the focus ID number. This is used to force the focus to this item. If this value is 0, the button text will be grayed, the button cannot be focused and will not respond to mouse clicks. Values above or below zero allow the control to be used.

This value is stored in a short.

Font
An optional parameter that is any expression for the font value to use. If this value is omitted, the default value of system font is used.
Comments: Although this is a layered graphic, it cannot be edited using the Idea Studio. It is for use within text mode editing only. The colors for this graphic are taken from Microsoft Windows™.
This function behaves like a Pick with the pressing of the left mouse button being the button combination to be detected. It will return 1 on the pressing of the left mouse button.

Example:

If ZButton(10, 70, 110, 40 { Bounding box for button },
           "OK" { Text label on button }, 
           1 { Focus ID }) 
           DoneState; 
[
  ... 
]

This action trigger will become true when the left mouse button clicks on the button drawn in the window. At that point the script will execute and then there will be a state change to DoneState.