LavishGUI:lguicheckbox (Data Type)

From Lavish Software Wiki
Revision as of 22:36, 15 December 2005 by Beefalo (talk | contribs)
Jump to navigation Jump to search

Description

This data type provides and controls data for checkbox (Element Type).

Members

  • string Text : checkbox text
  • bool Down : TRUE if the checkbox is pressed
  • bool Checked : TRUE if button is checked
  • lguifont Font : font object the checkbox is using

Methods

  • SetText[text] : sets the text on the checkbox
  • SetChecked : sets the checkbox to checked status
  • UnsetChecked : sets the checkbox to unchecked status
  • ToggleChecked : toggles the checkbox status

Inherits

lguielement

Returns

Same as lguielement.Name

Examples

Retrieve text on a checkbox

  • echo Text on Checkbox: ${UIElement[test].FindChild[checkboxtest].Text}
Output
Text on Checkbox: I am a test Checkbox

Display if a checkbox is pressed

  • echo Checkbox Pressed? ${UIElement[test].FindChild[checkboxtest].Down}
Output
Checkbox Pressed? FALSE

Display a checkbox's checked status

  • echo Checkbox Checked? ${UIElement[test].FindChild[checkboxtest].Checked}
Output
Checkbox Checked? FALSE

Display a checkbox's font

  • echo Checkbox font: ${UIElement[test].FindChild[checkboxtest].Font}
Output
Checkbox font: terminal

Set text on a checkbox

  • UIElement[test].FindChild[checkboxtest]:SetText[Checkbox Text V2.0]
  • echo Text on checkbox: ${UIElement[test].FindChild[checkboxtest].Text}
Output
Text on checkbox: Checkbox Text V2.0

Toggle a checkbox's checked status

  • UIElement[test].FindChild[checkboxtest]:ToggleChecked
  • echo Checkbox Checked? ${UIElement[test].FindChild[checkboxtest].Checked}
Output
Checkbox Checked? TRUE

Uncheck a checkbox

  • UIElement[test].FindChild[checkboxtest]:UnsetChecked
  • echo Checkbox Checked? ${UIElement[test].FindChild[checkboxtest].Checked}
Output
Checkbox Checked? FALSE

See Also