Difference between revisions of "LavishGUI:commandcheckbox (Element Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
 
=== What is a Command Check Box? ===
 
=== 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 ==
 
== Using Command Check Box ==
Check Boxes are descendants of the [[LavishGUI:checkbox (Element Type)|checkbox]] element type.  Any attributes of the [[LavishGUI:checkbox (Element Type)|checkbox]] element type may be applied in addition to the command check box-specific properties described below.
+
Command Check Boxes are descendants of the [[LavishGUI:checkbox (Element Type)|checkbox]] element type.  Any attributes of the [[LavishGUI:checkbox (Element Type)|checkbox]] element type may be applied in addition to the command check box-specific properties described below.
  
 
=== Command Check Box-Specific Properties ===
 
=== 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 ==
 
== Examples ==
 +
=== Example Code ===
 +
<commandcheckbox name='TestCommandCheckBox'>
 +
<nowiki><Font>
 +
                  <Name>terminal</Name>
 +
                  <Size>12</Size>
 +
                  <Color>FFFF00FF</Color>
 +
                </Font></nowiki>
 +
<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' />
 +
                <Data>${Script[test](exists)}</Data>
 +
                <Command>RunScript test</Command>
 +
                <CommandChecked>Script[test]:End</CommandChecked>
 +
</template>
  
 
== See Also ==
 
== See Also ==

Latest revision as of 03:28, 28 September 2005

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