User Tools

Site Tools


built_in:layouts

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
built_in:layouts [2016/12/24 11:22]
37.205.117.38 [Backgrounds]
built_in:layouts [2018/12/08 02:02] (current)
Line 155: Line 155:
 <code> obj.SetMargins( left, top, right, bottom );</code> <code> obj.SetMargins( left, top, right, bottom );</code>
 Using Linear layouts and setting margins on child objects is usually the best way to position your App's graphical objects. Using Linear layouts and setting margins on child objects is usually the best way to position your App's graphical objects.
 +
 +=====Backgrounds=====
 +The background of a layout will be transparent by default, but you can set a color using the **SetBackColor** function.
 +<code> lay.SetBackColor( colorCode );</code>
 +Colors are given as hex **color codes** which can be copied from various graphics programs or simply exprimented with until you get the color you want. The format is (#alpha:red:green:blue) where each value can range from 0 to 255 in base 16 which is 00 to ff.\\
 +For example "#ff00ff00" would be full strength green and "#ff000088" would be around half strength blue and "#44ff00ff" would be semi-transparent full strength purple.\\
 +You can also use a gradient background for a layout using the **SetBackGradient** and **SetBackGradientRadial** functions.
 +<code> lay.SetBackGradient( colorCode1, colorCode2 );</code>
 +<code> lay.SetBackGradientRadial( x, y, radius, colorCode1, colorCode2 );</code>
  
 =====Visibility===== =====Visibility=====
Line 165: Line 174:
 ^ Method                                                         ^ Description                                                                                                                                                                                                                                        ^ ^ Method                                                         ^ Description                                                                                                                                                                                                                                        ^
 | Layout.AddChild( child,order )                                 | child is the object to add to the Layout. Order is the rang option to make an object behind an other Object.                                                                                                                                       | | Layout.AddChild( child,order )                                 | child is the object to add to the Layout. Order is the rang option to make an object behind an other Object.                                                                                                                                       |
-| Layout.Animate( type,callback )                                | known types: <code>SlideFromLeft ScaleFromLeft SlideToLeft ScaleToLeft SlideFromRight ScaleFromRight SlideToRight ScaleToRight SlideFromTop ScaleFromTop SlideToTop ScaleToTop SlideFromBottom ScaleFromBottom SlideToBottom ScaleToBottom</code>  |+| Layout.Animate( type, callback, time )                                | known types: SlideFromLeft,SlideFromRight,SlideFromTop,SlideFromBottom,SlideToLeft,SlideToRight,SlideToTop,SlideToBottom,ScaleFromLeft, ScaleFromRight,ScaleFromTop, ScaleFromBottom, ScaleToLeft, ScaleToRight, ScaleToTop,ScaleToBottom,FadeIn,FadeOut,Flip|
 | Layout.ChildToFront( child )                                                                                                                                                                                                                                                                                      | | Layout.ChildToFront( child )                                                                                                                                                                                                                                                                                      |
 | Layout.Destroy()                                               | This function Destroys a Layout forever.                                                                                                                                                                                                           | | Layout.Destroy()                                               | This function Destroys a Layout forever.                                                                                                                                                                                                           |
built_in/layouts.1482578577.txt.gz ยท Last modified: 2016/12/24 19:22 (external edit)