User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

built_in:togglebuttons [2014/09/17 18:42]
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: 
-<code>btn = app.CreateToggle( text, width, height, options );</code> 
-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's width and height. 
-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 ^ 
-|btn.GetChecked| | 
-|btn.GetHeight| | 
-|btn.GetText| | 
-|btn.GetVisibility| | 
-|btn.GetWidth| | 
-|btn.Release| | 
-|btn.SetBackColor| | 
-|btn.SetBackGradient| | 
-|btn.SetBackGradientRadial| | 
-|btn.SetBackground| | 
-|btn.SetChecked| | 
-|btn.SetMargins| | 
-|btn.SetOnTouch| | 
-|btn.SetPadding| | 
-|btn.SetPosition| | 
-|btn.SetSize| | 
-|btn.SetText| | 
-|btn.SetTextColor| | 
-|btn.SetTextSize| | 
-|btn.SetVisibility| | 
built_in/togglebuttons.txt ยท Last modified: 2015/03/22 21:23 (external edit)