User Tools

Site Tools


Sidebar

Privacy Policy

News

Version 2.50 is out since Jan 1st 2022


Frequently Asked Questions


Namespaces

Note for contributors

If you wish to create a new page in the DroidScript wiki, please click on the most appropriate namespace above and follow the notes for contributors there.

Because of spam, it has been necessary to add a CAPTCHA to the registration form and the save option for editing pages. You will not need to prove you are human if you are logged in, so please register.

Please feel free to improve any existing page, as well as adding new pages to increase the sum of public knowledge about DroidScript.

Formatting Syntax

built_in:spinner

This is an old revision of the document!


Spinner control

Methods

Some controls use the same methods.
For examples of the same methods look here.

Method Description
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,p2,p3,p4,p5,p6,p7 )
Spinner.SetBackGradientRadial( p1,p2,p3,p4,p5,p6,p7 )
Spinner.SetBackground( p1,p2 )
Spinner.SetList( list, p2 )
Spinner.SetMargins( left,top,right,bottom )
Spinner.SetOnChange( callback )
Spinner.SetOnTouch( callback )
Spinner.SetPadding( left,top,right,bottom )
Spinner.SetPosition( left,top,width,height )
Spinner.SetScale( x,y )
Spinner.SetSize( width,height )
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.

spinnerSelectItem.js
function OnStart()
{
  lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
 
  spin = app.CreateSpinner( "Bilbo,Frodo,Gandalf", 0.4 );
  spin.SetOnChange( ShowSelection );
  //spin.SelectItem( "Frodo" ); Dont write it here!
  lay.AddChild( spin );
 
  app.AddLayout( lay );
  //Select the Item after app.AddLayout or
  //it will not work right!
  spin.SelectItem( "Frodo" );
}
 
 
function ShowSelection( item )
{
  app.ShowPopup( "Selected = " + item );
}
built_in/spinner.1427028531.txt.gz · Last modified: 2015/03/22 20:48 (external edit)