Component/Dropdown
Namespace
components.dropdown
Constants
The form module.
Source: lib/modules/components/dropdown.whl, line: 8
| MODULE_COMPONENT_DROPDOWN | 69 |
Module calls for the dropdown component functions.
Source: lib/modules/components/dropdown.whl, line: 11
DROPDOWN_COMPONENT_SET_HIDDEN | 0 |
DROPDOWN_COMPONENT_SET_DISABLED | 1 |
DROPDOWN_COMPONENT_SET_X | 2 |
DROPDOWN_COMPONENT_SET_Y | 3 |
DROPDOWN_COMPONENT_SET_VALUE | 4 |
DROPDOWN_COMPONENT_GET_VALUE | 5 |
DROPDOWN_COMPONENT_CLEAR | 6 |
DROPDOWN_COMPONENT_ADD_ITEM | 7 |
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. |
items | list | A list of selectable items. |
value | number | The selected item. |
Events
onChange
Called when an other item is selected.
proc onChange(number windowHandle, number value)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the dropdown. |
value | number | Index of the selected item, the index of the first item is 0, the second is 1, etc.. |
onFocus
Called when the dropdown is focussed.
proc onFocus(number windowHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the dropdown. |
onBlur
Called when the dropdown looses focus.
proc onBlur(number windowHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the parent window of the dropdown. |
Procedures
setHidden
Source: lib/modules/components/dropdown.whl, line: 41
Hide the dropdown component.
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/dropdown.whl, line: 50
Disable the dropdown component.
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/dropdown.whl, line: 59
Set the x position of the dropdown component.
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/dropdown.whl, line: 68
Set the y position of the dropdown component.
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. |
setValue
Source: lib/modules/components/dropdown.whl, line: 77
Set the value.
proc setValue(number windowHandle, number componentHandle, number value)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
value | number | The active item. |
getValue
Source: lib/modules/components/dropdown.whl, line: 86
Get the value.
proc getValue(number windowHandle, number componentHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
Return: The value.
clear
Source: lib/modules/components/dropdown.whl, line: 95
Clear the dropdown list.
proc clear(number windowHandle, number componentHandle)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
addItem
Source: lib/modules/components/dropdown.whl, line: 103
Add an item to the dropdown list.
proc addItem(number windowHandle, number componentHandle, number value, string text)
Parameters:
Name | Type | Description |
windowHandle | number | The handle of the window. |
componentHandle | number | The handle of the component. |
value | number | |
text | string | |