User Tools

Site Tools


built_in:buttons

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
Next revision Both sides next revision
built_in:buttons [2015/09/30 09:58]
stevegarman remove internal method
built_in:buttons [2018/07/20 21:33]
90.216.254.199 [Example - Default Size]
Line 20: Line 20:
 Some controls use the same methods.\\ Some controls use the same methods.\\
 For examples of the **[[same methods]]** look here. For examples of the **[[same methods]]** look here.
-^ Method                                          ^ Description                                                                                                                                                                                 ^ +^ Method                                                              ^ Description                                                                                                                                                                                 ^ 
-| Button.GetAbsHeight()                           |                                                                                                                                                                                             | +| Button.GetAbsHeight()                                               |                                                                                                                                                                                             | 
-| Button.GetAbsWidth()                            |                                                                                                                                                                                             | +| Button.GetAbsWidth()                                                |                                                                                                                                                                                             | 
-| Button.GetHeight()                              |                                                                                                                                                                                             | +| Button.GetHeight()                                                  |                                                                                                                                                                                             | 
-| Button.GetPosition()                            |                                                                                                                                                                                             | +| Button.GetPosition()                                                |                                                                                                                                                                                             | 
-| Button.GetText()                                | Fetches the recent caption (text) of a button. Returns a string.                                                                                                                            | +| Button.GetText()                                                    | Fetches the recent caption (text) of a button. Returns a string.                                                                                                                            | 
-| Button.GetTextSize( mode )                      |                                                                                                                                                                                             | +| Button.GetTextSize( mode )                                          |                                                                                                                                                                                             | 
-| Button.GetType()                                |                                                                                                                                                                                             | +| Button.GetType()                                                    |                                                                                                                                                                                             | 
-| Button.GetVisibility()                          |                                                                                                                                                                                             | +| Button.GetVisibility()                                              |                                                                                                                                                                                             | 
-| Button.GetWidth()                               |                                                                                                                                                                                             | +| Button.GetWidth()                                                   |                                                                                                                                                                                             | 
-| Button.SetFontFile( file )                      |                                                                                                                                                                                             | +| Button.SetFontFile( file )                                          |                                                                                                                                                                                             | 
-| Button.SetHtml( html )                          |                                                                                                                                                                                             | +| Button.SetHtml( html )                                              |                                                                                                                                                                                             | 
-| Button.SetMargins( left,top,right,bottom )      |                                                                                                                                                                                             | +| Button.SetMargins( left,top,right,bottom )                          |                                                                                                                                                                                             | 
-| Button.SetOnTouch( callback )                   |                                                                                                                                                                                             | +| Button.SetOnTouch( callback )                                       |                                                                                                                                                                                             | 
-| Button.SetPadding( left,top,right,bottom )      |                                                                                                                                                                                             | +| Button.SetPadding( left,top,right,bottom )                          |                                                                                                                                                                                             | 
-| Button.SetPosition( left, top, width, height )  |                                                                                                                                                                                             | +| Button.SetPosition( left, top, width, height )                      |                                                                                                                                                                                             | 
-| Button.SetScale( x,y )                          |                                                                                                                                                                                             | +| Button.SetScale( x,y )                                              |                                                                                                                                                                                             | 
-| Button.SetSize( width, height )                 |                                                                                                                                                                                             | +| Button.SetSize( width, height )                                     |                                                                                                                                                                                             
-| Button.SetText( text )                          | Changes the caption (text) displayed in a button to the given string value. Example: <code>Button.SetText("This is a string.");   </code>                                                   | +| Button.SetStyle(color1,color2,radius,strokeClr,strokeWidth,shadow)  | Used with **Custom** option                                                                                                                                                                 
-| Button.SetTextColor( colorcode )                | Sets the text color of a button. Use css-style color code, i.e. "#ffffff" for white.                                                                                                        | +| Button.SetText( text )                                              | Changes the caption (text) displayed in a button to the given string value. Example: <code>Button.SetText("This is a string.");   </code>                                                   | 
-| Button.SetTextShadow( radius,dx,dy,color )      |                                                                                                                                                                                             | +| Button.SetTextColor( colorcode )                                    | Sets the text color of a button. Use css-style color code, i.e. "#ffffff" for white.                                                                                                        | 
-| Button.SetTextSize( size,mode )                 |                                                                                                                                                                                             | +| Button.SetTextShadow( radius,dx,dy,color )                          |                                                                                                                                                                                             | 
-| Button.SetVisibility( HideShow )                | "Hide" hides the button without affecting the rest of the layout. "Show" displays the button. "Gone" hides the button totally, so that the layout will be rearranged. (See example below.)  |+| Button.SetTextSize( size,mode )                                     |                                                                                                                                                                                             | 
 +| Button.SetVisibility( HideShow )                                    | "Hide" hides the button without affecting the rest of the layout. "Show" displays the button. "Gone" hides the button totally, so that the layout will be rearranged. (See example below.)  |
  
 ===== Options ===== ===== Options =====
  
-^Option ^Description ^ +Options      ^ Description                                          
-|Alum| Display the Button in aluminuim style| +| Alum         | Display the Button in aluminum style                 
-|FillX| Fill the layout width| +| FillX        | Fill the layout width                                
-|Gray| Display the Button in Gray Color| +| Gray         | Display the Button in Gray Color                     
-|NoSound| Play no sound, if the button will be touched|+| NoSound      | Play no sound, if the button will be touched         | 
 +| Custom       | [[sample_code:button_styles|Custom Buttons sample]] 
 +| NoPad        | Removes default padding of custom buttons            | 
 +| FontAwesome  | Use Font-Awesome icons                               | 
 +| Html         | Enable HTML in button-text                           |
  
 ---- ----
Line 62: Line 67:
   lay = app.CreateLayout( "Linear", "VCenter,FillXY" );   lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
  
-  btn = app.CreateButton( "Press Me" );+  btn = app.CreateButton( "T-pose on those depressed normie niBBas" );
   btn.SetOnTouch( SayHello );   btn.SetOnTouch( SayHello );
   lay.AddChild( btn );   lay.AddChild( btn );
built_in/buttons.txt · Last modified: 2018/07/21 05:36 (external edit)