User Tools

Site Tools


built_in:add_layout

Differences

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

Link to this comparison view

built_in:add_layout [2015/03/04 15:47]
octazid created
built_in:add_layout [2018/09/02 17:59]
Line 1: Line 1:
-=====AddLayout===== 
- 
-//(Information and examples taken from the DroidScript documentation)// 
- 
-====Description==== 
- 
-Use the **AddLayout** method to add your layouts to the App. Each layout added will be placed on top of the previously added layout. 
-Note: You can add empty layouts above your main layout and then add or remove objects from these empty layouts at any time to create popup or slide out panel and menu effects. 
- 
-<code> app.AddLayout( layout );</code> 
- 
-See also [[built_in:layouts|Layouts]] 
- 
- 
----- 
- 
- 
-====Example - Vertical==== 
- 
-<code javascript> 
- 
-function OnStart() 
-{ 
-  lay = app.CreateLayout( "Linear", "Vertical,VCenter" ); 
- 
-  txt = app.CreateText( "Hello" ); 
-  lay.AddChild( txt ); 
- 
-  app.AddLayout( lay ); 
-} 
- 
-</code> 
  
built_in/add_layout.txt ยท Last modified: 2018/09/02 17:59 (external edit)