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:tabs

Table of Contents

Tabs control

Methods

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

Method Description
Tabs.AddChild( child,order )
Tabs.Animate( type,callback )
Tabs.ChildToFront( child )
Tabs.Destroy()
Tabs.DestroyChild( child )
Tabs.GetAbsHeight()
Tabs.GetAbsWidth()
Tabs.GetChildOrder( child )
Tabs.GetHeight()
Tabs.GetLayout( name )
Tabs.GetPosition()
Tabs.GetType()
Tabs.GetVisibility()
Tabs.GetWidth()
Tabs.Release()
Tabs.RemoveChild( child )
Tabs.SetBackColor( p1 )
Tabs.SetBackGradient( p1,p2,p3,p4,p5,p6,p7 )
Tabs.SetBackGradientRadial( p1,p2,p3,p4,p5,p6,p7 )
Tabs.SetBackground( p1,p2 )
Tabs.SetMargins( left,top,right,bottom )
Tabs.SetOnChange( callback )
Tabs.SetOrientation( p1 )
Tabs.SetPadding( p1,p2,p3,p4 )
Tabs.SetPosition( p1,p2,p3,p4 )
Tabs.SetScale( x,y )
Tabs.SetSize( p1,p2 )
Tabs.SetTouchable( p1 )
Tabs.SetVisibility( p1 )
Tabs.ShowTab( name )

Example

(Example taken from the DroidScript sample section)

//Called when application is started.
function OnStart()
{
	//Create a layout with objects vertically centered.
	lay = app.CreateLayout( "linear", "VCenter,FillXY" );	
 
	//Create tabs.
    var tabs = app.CreateTabs( "FRED,BILL,MARK", 0.8, 0.8, "VCenter" );
    tabs.SetOnChange( tabs_OnChange ); 
    lay.AddChild( tabs ); 
    
    //Add button to first tab.
    layFred = tabs.GetLayout( "FRED" );
    btn = app.CreateButton( "Button" );
    layFred.AddChild( btn );
    
    //Add button to second tab.
    layBill = tabs.GetLayout( "BILL" );
    chk = app.CreateCheckBox( "CheckBox" );
    layBill.AddChild( chk );
 
	//Add layout to app.	
	app.AddLayout( lay );
}
 
//Handle tab selection.
function tabs_OnChange( name )
{
    app.ShowPopup( name );
}
built_in/tabs.txt · Last modified: 2015/03/22 21:12 (external edit)