LavishGUI:commandcheckbox (Element Type)

From Lavish Software Wiki
Jump to navigation Jump to search

Introduction

What is a Command Check Box?

A command checkbox is a box with two states (checked and unchecked) that when changed executes a command.

Using Command Check Box

Command Check Boxes are descendants of the checkbox element type. Any attributes of the checkbox element type may be applied in addition to the command check box-specific properties described below.

Command Check Box-Specific Properties

  • Command
Command to be executed when an unchecked box is clicked (or the checked box if CommandChecked not specified)
  • CommandChecked
Command to be executed when the checked box is clicked
  • Data
Mathematical Formula (may include data sequences) used to determine whether the box is checked or unchecked. If the result is 0, the box is not checked. If the result is not 0, the box is checked.

Examples

Example Code

<commandcheckbox name='TestCommandCheckBox'>
		<Font>
                   <Name>terminal</Name>
                   <Size>12</Size>
                   <Color>FFFF00FF</Color>
                </Font>
		<Width>40</Width> 
		<Height>20</Height> 
		<Texture Filename='CheckBox-Up.png' />
		<TextureHover Filename='CheckBox-Highlight.png' />
		<TexturePressed Filename='CheckBox-Up.png' />
		<TextureChecked Filename='CheckBox-Down.png' />
		<TextureCheckedHover Filename='CheckBox-DownHighlight.png' />
		<TextureCheckedPressed Filename='CheckBox-Down.png' />
               ${Script[test](exists)}
               <Command>RunScript test</Command>
               <CommandChecked>Script[test]:End</CommandChecked>
</template>

See Also