Difference between revisions of "LavishGUI:lguislider (Data Type)"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
== Description == | == Description == | ||
− | This data type provides and controls data for | + | This data type provides and controls data for LGUI sliders. |
== Members == | == Members == | ||
* [[DataType:int|int]] '''Range''' : range of the slider (0-Range) | * [[DataType:int|int]] '''Range''' : range of the slider (0-Range) | ||
Line 14: | Line 14: | ||
== Returns == | == Returns == | ||
− | Same as ''' | + | Same as '''lguielement.Name''' |
== Examples == | == Examples == |
Revision as of 20:39, 9 December 2005
Contents
Description
This data type provides and controls data for LGUI sliders.
Members
- int Range : range of the slider (0-Range)
- int Value : value of the slider
- bool Vertical : TRUE if the slider is up and down instead of left to right
Methods
- SetRange[#] : sets the range of the slider
- SetValue[#] : sets the value of the slider
Inherits
Returns
Same as lguielement.Name
Examples
Display the range and value of a slider
- echo Range: ${UIElement[test].FindChild[test].Range}
- echo Value: ${UIElement[test].FindChild[test].Value}
- Output
Range: 100 Value: 51
Set a slider's Range
- UIElement[test].FindChild[test]:SetRange[100]
- This command sets the Range of "test" from 0 to 100
Set a slider's Value
- UIElement[test].FindChild[test]:SetValue[50]
- This command sets the Value of "test" to 50 (exactly the halfway point)
- Example code
<?xml version="1.0" encoding="UTF-8"?> <ISUI> <window name='test'> <X>200</X> <Y>200</Y> <Width>150</Width> <Height>80</Height> <Title>My Window</Title> <Children> <slider name='test'> <X>15</X> <Y>5</Y> <Width>100</Width> <Height>20</Height> </slider> </Children> </window> </ISUI>