Wheel IDE

Online demo »

Component/Rectangle

Namespace
components.rectangle

Constants

The form component module.
Source: lib/modules/components/rectangle.whl, line: 8
MODULE_COMPONENT_RECTANGLE96

Module calls for rectangle component functions.
Source: lib/modules/components/rectangle.whl, line: 11
RECTANGLE_SET_HIDDEN0
RECTANGLE_SET_X1
RECTANGLE_SET_Y2
RECTANGLE_SET_WIDTH3
RECTANGLE_SET_HEIGHT4
RECTANGLE_SET_FILL_COLOR5
RECTANGLE_SET_BORDER_COLOR6
RECTANGLE_SET_BORDER_WIDTH7
RECTANGLE_SET_BORDER_RADIUS8

Properties

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

NameTypeDescription
namestringThe component name.
hiddenbooleanHide 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.
widthnumberThe rectangle width.
heightnumberThe rectangle height.
fillColorrgbThe fill color in red, green and blue.
borderColorrgbThe border color in red, green and blue.
borderWidthnumberThe border width.
borderRadiusnumberThe border radius, this value can give the rectangle rounded corners.

Events

onClick

Called when the rectangle is clicked.

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

Called when the mouse is pressed on the rectangle.

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

Called when the mouse is released on the rectangle.

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

Called when the mouse moves over the rectangle.

proc onMouseMove(number windowHandle)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the parent window of the rectangle.
onMouseOut

Called when the mouse moves out of the rectangle.

proc onMouseOut(number windowHandle)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the parent window of the rectangle.

Procedures

setHidden
Source: lib/modules/components/rectangle.whl, line: 50

Hide the rectangle.

proc setHidden(number windowHandle, number componentHandle, number hidden)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
hiddennumberHidden TRUE or FALSE.

setX
Source: lib/modules/components/rectangle.whl, line: 59

Set the x position of the rectangle.

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/rectangle.whl, line: 68

Set the y position of the rectangle.

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.

setWidth
Source: lib/modules/components/rectangle.whl, line: 77

Set the rectangle width.

proc setWidth(number windowHandle, number componentHandle, number width)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
widthnumberThe rectangle width.

setHeight
Source: lib/modules/components/rectangle.whl, line: 86

Set the rectangle height.

proc setHeight(number windowHandle, number componentHandle, number height)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
heightnumberThe rectangle height.

setFillColor
Source: lib/modules/components/rectangle.whl, line: 95

Set the fill color.

proc setFillColor(number windowHandle, number componentHandle, number red, number green, number blue)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
rednumberThe red color component, a value in the range of 0..255.
greennumberThe green color component, a value in the range of 0..255.
bluenumberThe blue color component, a value in the range of 0..255.

setBorderColor
Source: lib/modules/components/rectangle.whl, line: 106

Set the border color.

proc setBorderColor(number windowHandle, number componentHandle, number red, number green, number blue)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
rednumberThe red color component, a value in the range of 0..255.
greennumberThe green color component, a value in the range of 0..255.
bluenumberThe blue color component, a value in the range of 0..255.

setBorderWidth
Source: lib/modules/components/rectangle.whl, line: 117

Set the border width.

proc setBorderWidth(number windowHandle, number componentHandle, number borderWidth)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
borderWidthnumberThe border width.

setBorderRadius
Source: lib/modules/components/rectangle.whl, line: 126

Set the border radius.

proc setBorderRadius(number windowHandle, number componentHandle, number borderRadius)
Parameters:
NameTypeDescription
windowHandlenumberThe handle of the window.
componentHandlenumberThe handle of the component.
borderRadiusnumber