ZButton

Description:              This function draws a layered button in a window and returns true when selected.

Returns:                    Boolean

Usage:                       Steady State

Format:                      ZButton(Left, Bottom, Right, Top, Label, FocusID [, Font])

Parameters:             Left     { numeric }  { required }  { no default: }

                                                Any numeric expression for the left side coordinate of the button.

                                    Bottom     { numeric }  { required }  { no default: }

                                                Any numeric expression for the bottom side coordinate of the button.

                                    Right     { numeric }  { required }  { no default: }

                                                Any numeric expression for the right side coordinate of the button.

                                    Top     { numeric }  { required }  { no default: }

                                                Any numeric expression for the top side coordinate of the button.

                                    Label     { text }  { required }  { no default: }

                                                Any text expression for the button label.

                                    FocusID     { numeric }  { required }  { no default: }

                                                Any numeric expression 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.

                                    Font     { Font }  { optional }  { no default: }

                                                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 toolbar. 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.

See Also:

GUIButton