Difference between revisions of "LavishGUI:lguibutton (Data Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 10: Line 10:
 
*'''SetBackgroundColor['''hex''']''' : sets the background color
 
*'''SetBackgroundColor['''hex''']''' : sets the background color
 
== Inherits ==
 
== Inherits ==
[[ISSession:isuielement (Data Type)|isuielement]]
+
[[LavishGUI:lguielement_%28Data_Type%29|lguielement]]
  
 
== Returns ==
 
== Returns ==

Revision as of 20:38, 9 December 2005

Description

This data type provides and controls data for ISUI buttons.

Members

  • string Text : button text
  • bool Down : TRUE if button is pressed
  • isuifont Font : font object the button is using
  • int BackgroundColor : color of the background

Methods

  • SetText[text] : sets the text on the button
  • SetBackgroundColor[hex] : sets the background color

Inherits

lguielement

Returns

Same as isuielement.Name

Examples

Retrieve text on a button

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

Display if a button is pressed

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

Display a button's font

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

Set text on a button

  • UIElement[test].FindChild[buttontest]:SetText[Button Text V2.0]
  • echo Text on button: ${UIElement[test].FindChild[buttontest].Text}
Output
Text on button: Button Text V2.0


See Also