Component/Button
Namespace
components.button
Constants
The button component module.
Source: lib/modules/components/button.whl, line: 8
| MODULE_COMPONENT_BUTTON | 65 |
Module calls for the button component functions.
Source: lib/modules/components/button.whl, line: 11
BUTTON_COMPONENT_SET_HIDDEN | 0 |
BUTTON_COMPONENT_SET_DISABLED | 1 |
BUTTON_COMPONENT_SET_X | 2 |
BUTTON_COMPONENT_SET_Y | 3 |
BUTTON_COMPONENT_SET_COLOR | 4 |
BUTTON_COMPONENT_SET_TITLE | 5 |
BUTTON_COMPONENT_SET_HINT | 6 |
Properties
These properties can be edited with the property editor in the IDE.
Name | Type | Description |
name | string | The component name. |
hidden | boolean | Hide the component. |
disabled | boolean | Disable the component. |
x | number | The left position of the component inside the parent component. |
y | number | The top position of the component inside the parent component. |
zIndex | number | The depth of the component related to other components in the parent. |
width | number|empty | The width of the button, if empty then the default size is used. |
height | number|empty | The height of the button, if empty then the default size is used. |
color | color | The color of the buttons, available colors are: gray, yellow, green, blue or red. |
value | string | The title of the button. |
title | string | The hint button which will show up after hovering on the button. |
Events
onClick
Called when the button is clicked.
proc onClick(number windowHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the button. |
onFocus
Called when the button is focussed.
proc onFocus(number windowHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the button. |
onBlur
Called when the button looses focus.
proc onBlur(number windowHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the button. |
onMouseDown
Called when the mouse is pressed on the button.
proc onMouseDown(number windowHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the button. |
onMouseUp
Called when the mouse is released from the button.
proc onMouseUp(number windowHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the button. |
onMouseOut
Called when the mouse moves from inside to outside the button.
proc onMouseOut(number windowHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the button. |
Procedures
setHidden
Source: lib/modules/components/button.whl, line: 51
Hide the button.
proc setHidden(number windowHandle, number componentHandle, number hidden)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
hidden | number | Hidden TRUE or FALSE. |
setDisabled
Source: lib/modules/components/button.whl, line: 60
Disable the button.
proc setDisabled(number windowHandle, number componentHandle, number disabled)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
disabled | number | Disabled TRUE or FALSE. |
setX
Source: lib/modules/components/button.whl, line: 69
Set the x position of the button.
proc setX(number windowHandle, number componentHandle, number x)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
x | number | The x position in pixels. |
setY
Source: lib/modules/components/button.whl, line: 78
Set the y position of the button.
proc setY(number windowHandle, number componentHandle, number y)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
y | number | The y position in pixels. |
setColor
Source: lib/modules/components/button.whl, line: 87
Set the button color.
proc setColor(number windowHandle, number componentHandle, number color)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
color | number | The button color. |
setTitle
Source: lib/modules/components/button.whl, line: 96
Set title of the button.
proc setTitle(number windowHandle, number componentHandle, string title)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
title | string | The button title. |
setHint
Source: lib/modules/components/button.whl, line: 105
Set button hint.
proc setHint(number windowHandle, number componentHandle, string hint)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
hint | string | The button hint. |