This example shows how to use the selectButton component.
"SelectButton example" "lib/modules/standard.whl" "lib/modules/components/component.whl" "lib/modules/components/form.whl" "lib/modules/components/selectButton.whl" "lib/modules/components/statusLight.whl" SELECT_BUTTON_SELECT_BUTTON 0xF121D096 SELECT_BUTTON_STATUS_LIGHT 0x8FBC7C0A "selectButton.wfrm" number buttonToColor[3] = [COMPONENT_COLOR_RED, COMPONENT_COLOR_GREEN, COMPONENT_COLOR_BLUE] ; @proc SelectButton onChange event. ; @param windowHandle The handle to the active window. ; @param value New active button. proc onSelectButtonSelectButtonChange(number windowHandle, number value) components.statusLight.setColor(windowHandle, SELECT_BUTTON_STATUS_LIGHT, buttonToColor[value]) end ; @proc Show the form. ; @ret The handle to the form. proc showSelectButtonForm() ret components.form.show("selectButton.wfrm") end proc main() showSelectButtonForm() halt() end