This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
built_in:checkboxes [2014/12/05 13:36] 162.252.85.172 [Methods] |
built_in:checkboxes [2015/11/02 19:05] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== CheckBoxes ====== | ====== CheckBoxes ====== | ||
- | ===== Create | + | |
- | Create CheckBoxes using the CreateCheckBox method of the app object: | + | // |
- | < | + | |
- | Use the SetOnTouch method of the CheckBox object to set the name of a function you want to be called when the CheckBox is touched. You can read the ' | + | ===== Description |
+ | Create CheckBoxes using the **CreateCheckBox** method of the [[built_in: | ||
+ | < | ||
+ | Use the **SetOnTouch** method of the CheckBox object to set the name of a function you want to be called when the CheckBox is touched. You can read the ' | ||
+ | |||
+ | ---- | ||
===== Methods ===== | ===== Methods ===== | ||
+ | Some controls use the same methods.\\ | ||
+ | For examples of the **[[same methods]]** look here. | ||
^Method ^Description ^ | ^Method ^Description ^ | ||
|CheckBox.Destroy() | | | |CheckBox.Destroy() | | | ||
Line 18: | Line 25: | ||
|CheckBox.GetWidth() | | | |CheckBox.GetWidth() | | | ||
|CheckBox.Release() | | | |CheckBox.Release() | | | ||
- | |CheckBox.SetBackColor( | + | |CheckBox.SetBackColor( |
- | |CheckBox.SetBackGradient( | + | |CheckBox.SetBackGradient( |
- | |CheckBox.SetBackGradientRadial( | + | |CheckBox.SetBackGradientRadial( |
- | |CheckBox.SetBackground( | + | |CheckBox.SetBackground( |
- | |CheckBox.SetChecked( | + | |CheckBox.SetChecked( |
|CheckBox.SetMargins( left, | |CheckBox.SetMargins( left, | ||
|CheckBox.SetOnTouch( callback ) | | | |CheckBox.SetOnTouch( callback ) | | | ||
- | |CheckBox.SetPadding( | + | |CheckBox.SetPadding( |
- | |CheckBox.SetPosition( | + | |CheckBox.SetPosition( |
|CheckBox.SetScale( x,y ) | | | |CheckBox.SetScale( x,y ) | | | ||
- | |CheckBox.SetSize( | + | |CheckBox.SetSize( |
- | |CheckBox.SetText( | + | |CheckBox.SetText( |
- | |CheckBox.SetTextColor( | + | |CheckBox.SetTextColor( |
|CheckBox.SetTextSize( size,mode ) | | | |CheckBox.SetTextSize( size,mode ) | | | ||
- | |CheckBox.SetVisibility( | + | |CheckBox.SetVisibility( |
+ | |||
+ | ---- | ||
+ | |||
+ | ====Example==== | ||
+ | |||
+ | <code javascript> | ||
+ | function OnStart() | ||
+ | { | ||
+ | lay = app.CreateLayout( " | ||
+ | |||
+ | chk = app.CreateCheckBox( " | ||
+ | chk.SetOnTouch( ShowState ); | ||
+ | lay.AddChild( chk ); | ||
+ | |||
+ | app.AddLayout( lay ); | ||
+ | } | ||
+ | |||
+ | function ShowState( isChecked ) | ||
+ | { | ||
+ | app.ShowPopup( " | ||
+ | } | ||
+ | </ |