This shows you the differences between two versions of the page.
built_in:spinner [2015/03/22 12:48] octazid [Table] |
built_in:spinner [2016/06/04 01:02] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Spinner control ====== | ||
- | |||
- | ===== Methods ===== | ||
- | Some controls use the same methods.\\ | ||
- | For examples of the **[[same methods]]** look here. | ||
- | ^ Method | ||
- | | Spinner.Destroy() | ||
- | | Spinner.GetAbsHeight() | ||
- | | Spinner.GetAbsWidth() | ||
- | | Spinner.GetHeight() | ||
- | | Spinner.GetPosition() | ||
- | | Spinner.GetText() | ||
- | | Spinner.GetTextSize( mode ) | | | ||
- | | Spinner.GetType() | ||
- | | Spinner.GetVisibility() | ||
- | | Spinner.GetWidth() | ||
- | | Spinner.Release() | ||
- | | Spinner.SelectItem( p1 ) | See the info | | ||
- | | Spinner.SetBackColor( colorcode ) | | | ||
- | | Spinner.SetBackGradient( p1, | ||
- | | Spinner.SetBackGradientRadial( p1, | ||
- | | Spinner.SetBackground( p1,p2 ) | ||
- | | Spinner.SetList( list, p2 ) | | | ||
- | | Spinner.SetMargins( left, | ||
- | | Spinner.SetOnChange( callback ) | | | ||
- | | Spinner.SetOnTouch( callback ) | ||
- | | Spinner.SetPadding( left, | ||
- | | Spinner.SetPosition( left, | ||
- | | Spinner.SetScale( x,y ) | | | ||
- | | Spinner.SetSize( width, | ||
- | | Spinner.SetText( text ) | | | ||
- | | Spinner.SetTextColor( colorcode ) | | | ||
- | | Spinner.SetTextSize( size,mode ) | ||
- | | Spinner.SetVisibility( HideShow ) | | | ||
- | |||
- | ===== Info to Version 1.15 and before ===== | ||
- | If the SelectItem method is called before the spinner and the layout is added to the app-object the OnChange event of the spinner is fired only after the second manual selection change. | ||
- | |||
- | <code JavaScript spinnerSelectItem.js> | ||
- | function OnStart() | ||
- | { | ||
- | lay = app.CreateLayout( " | ||
- | |||
- | spin = app.CreateSpinner( " | ||
- | spin.SetOnChange( ShowSelection ); | ||
- | // | ||
- | lay.AddChild( spin ); | ||
- | |||
- | app.AddLayout( lay ); | ||
- | //Select the Item after app.AddLayout or | ||
- | //it will not work right! | ||
- | spin.SelectItem( " | ||
- | } | ||
- | |||
- | |||
- | function ShowSelection( item ) | ||
- | { | ||
- | app.ShowPopup( " | ||
- | } | ||
- | </ | ||