Widgets SWITCH - thica/ORCA-Remote GitHub Wiki

SWITCH

The switch widget action is based on the button widget, so refer the the button widget for further information. The switch widget can only be used for picture buttons, and it toggles the "normal" and the "pressed" pictures. The state of the button will passed to variable you have to provide, and toogles to '0" and '1" The following attributes are additional attributes to button widget attributes

Attribute Description
type fixed: needs to be "SWITCH". Capital letters!
destvar The destination variable , which will be switched on state change. Will be set to "0" or "1"
group You can group switches into a group, so that only one switch in a group will be active. Here can can provide a name to a switch, which belongs top a group. You can use the allbuttonsoff widget action to set all switches in a group to off

Below you see an example for a switch widget

<element name="ButtonBiState" type="SWITCH"  posy="%40" height="of:width:self:*0.25" fontsize='%h50' caption='Switch Button' htextalign='center' vtextalign='middle' picturenormal="button wide*" destvar="STATUSBUTTONBISTATE" action="ToggleButtonBiState"/>
⚠️ **GitHub.com Fallback** ⚠️