Wheel IDE

Online demo »

Component/Button

Namespace
components.button

Constants

The button component module.
Source: lib/modules/components/button.whl, line: 8
MODULE_COMPONENT_BUTTON65

Module calls for the button component functions.
Source: lib/modules/components/button.whl, line: 11
BUTTON_COMPONENT_SET_HIDDEN0
BUTTON_COMPONENT_SET_DISABLED1
BUTTON_COMPONENT_SET_X2
BUTTON_COMPONENT_SET_Y3
BUTTON_COMPONENT_SET_COLOR4
BUTTON_COMPONENT_SET_TITLE5
BUTTON_COMPONENT_SET_HINT6

Properties

These properties can be edited with the property editor in the IDE.

NameTypeDescription
namestringThe component name.
hiddenbooleanHide the component.
disabledbooleanDisable the component.
xnumberThe left position of the component inside the parent component.
ynumberThe top position of the component inside the parent component.
zIndexnumberThe depth of the component related to other components in the parent.
widthnumber|emptyThe width of the button, if empty then the default size is used.
heightnumber|emptyThe height of the button, if empty then the default size is used.
colorcolorThe color of the buttons, available colors are: gray, yellow, green, blue or red.
valuestringThe title of the button.
titlestringThe hint button which will show up after hovering on the button.

Events

onClick

Called when the button is clicked.

proc onClick(number windowHandle)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the parent window of the button.
onFocus

Called when the button is focussed.

proc onFocus(number windowHandle)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the parent window of the button.
onBlur

Called when the button looses focus.

proc onBlur(number windowHandle)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the parent window of the button.
onMouseDown

Called when the mouse is pressed on the button.

proc onMouseDown(number windowHandle)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the parent window of the button.
onMouseUp

Called when the mouse is released from the button.

proc onMouseUp(number windowHandle)
Parameters:
NameTypeDescription
windowHandlenumberThe 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:
NameTypeDescription
windowHandlenumberThe 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:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
hiddennumberHidden TRUE or FALSE.

setDisabled
Source: lib/modules/components/button.whl, line: 60

Disable the button.

proc setDisabled(number windowHandle, number componentHandle, number disabled)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
disablednumberDisabled 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:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
xnumberThe 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:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
ynumberThe 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:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
colornumberThe 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:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
titlestringThe button title.

setHint
Source: lib/modules/components/button.whl, line: 105

Set button hint.

proc setHint(number windowHandle, number componentHandle, string hint)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
hintstringThe button hint.