This shows you the differences between two versions of the page.
built_in:togglebuttons [2014/12/05 13:20] 162.252.85.172 [Methods] |
built_in:togglebuttons [2015/03/22 21:23] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ToggleButtons ====== | ||
- | ===== Create ===== | ||
- | Create toggle buttons using the CreateToggle method of the app object: | ||
- | < | ||
- | You can allow the toggle button to auto-size by leaving out the dimensions or you can specify a width and height as decimal fractions of the screen' | ||
- | Use the SetOnTouch method of your button object to set the name of a function you want to be called when the button is touched. | ||
- | |||
- | You can get the state of the toggle button at any time using the GetChecked method of the button. The button state is also passed into your OnTouch callback function as a parameter every time the button is touched. | ||
- | ===== Methods ===== | ||
- | ^Method ^Description ^ | ||
- | |ToggleButton.Destroy() | | | ||
- | |ToggleButton.GetAbsHeight() | | | ||
- | |ToggleButton.GetAbsWidth() | | | ||
- | |ToggleButton.GetChecked() | | | ||
- | |ToggleButton.GetHeight() | | | ||
- | |ToggleButton.GetPosition() | | | ||
- | |ToggleButton.GetText() | | | ||
- | |ToggleButton.GetTextSize( mode ) | | | ||
- | |ToggleButton.GetType() | | | ||
- | |ToggleButton.GetVisibility() | | | ||
- | |ToggleButton.GetWidth() | | | ||
- | |ToggleButton.Release() | | | ||
- | |ToggleButton.SetBackColor( p1 ) | | | ||
- | |ToggleButton.SetBackGradient( p1, | ||
- | |ToggleButton.SetBackGradientRadial( p1, | ||
- | |ToggleButton.SetBackground( p1,p2 ) | | | ||
- | |ToggleButton.SetChecked( p1 ) | | | ||
- | |ToggleButton.SetMargins( left, | ||
- | |ToggleButton.SetOnTouch( p1 ) | | | ||
- | |ToggleButton.SetPadding( p1,p2,p3,p4 ) | | | ||
- | |ToggleButton.SetPosition( p1,p2,p3,p4 ) | | | ||
- | |ToggleButton.SetScale( x,y ) | | | ||
- | |ToggleButton.SetSize( p1,p2 ) | | | ||
- | |ToggleButton.SetText( p1 ) | | | ||
- | |ToggleButton.SetTextColor( p1 ) | | | ||
- | |ToggleButton.SetTextSize( size,mode ) | | | ||
- | |ToggleButton.SetVisibility( p1 ) | | |