Widgets DROPDOWN - thica/ORCA-Remote GitHub Wiki

DROPDOWN

The dropdown list widget is one of the core widgets. It is based on a button widget, which adds further option buttons linked to the button, when the button is clicked If you press a button from the options buttons, an action is triggered The "DROPDOWNVALUE" value is added to the action pars which refers to the button text The "DROPDOWNINDEX" index is added to the action pars which refers to the button order, eg: "0" is the first button in the list

The button widget shares the common widget attributes and the button widget attributes. The following attributes are additional attributes to button widget attributes:

Attribute Description
type fixed: needs to be "DROPDOWN". Capital letters!
captions List of captions for all option buttons. This is a comma separated list. You can pass $DIRLIST[mypath] as captions, which then expands to the list of folders within that path. You can pass an array of variables as well. In this case, you need to pass the variable name (without $var() (MyBottonText:::Myarray[]). Each of the elements will be seen as a variable, which will be expanded at runtime
actions List of actions for each option button. This is a comma separated list. This list must match the numer of captions. If you do not want to bind a caption, leave it as a comma seperated empty list (e.g. ",,,,"). If you pass only one action, than this will be called for all events. In all cases, a function var will be passed with the value of the selected option. (eg. MYACTION_parameter_DROPDOWNVALUE)
framecolor If you want a colored frame around the dropdown, this specifies the frame color.
framewidth If you want a colored frame around the dropdown, this specifies the frame width, either in relative pixels or in percentage, If not given, a defult vaule will be used
sorted (0/1) If set, the captions of the dropdown will be sorted, It will not sorte the actions, so use it only if you use the same action for each item

Below you see an example for a dropdown widget

<element name="Dropdown" type="DROPDOWN" fontsize='%h50' caption='My Dropdown' captions='Option 1,Option 2,Option 3,Option 4' actions=',,,' htextalign='center' vtextalign='middle' picturenormal="button wide*" framecolor='$var(dimmed)' framewidth='500'/>
⚠️ **GitHub.com Fallback** ⚠️