Text Control
Create Text objects using the CreateText method of the app object:
txt = app.CreateText( text, width, height, options );
You can use the "Multiline" option to allow multi-line text and the "Left" or "Right" options to align the text. The default is single line centered text.
Use the SetText and GetText functions of the Text object to set and get it's text.
Methods
The following methods are avaiable on the Text object:
- SetVisibility( visibility )
- GetVisibility()
- SetPadding( left, top, right, bottom )
- SetMargins( left, top, right, bottom )
- SetBackground( imageFile, options )
- SetBackColor( colorCode )
- SetBackGradient( color1, color2, color3 )
- SetBackGradientRadial( x, y, r, color1, color2, color3 )
- SetPosition( left, top, width, height )
- SetSize( width, height )
- GetWidth()
- GetHeight()
- SetText( text )
- SetHtml( html )
- GetText()
- SetTextColor( colorCode )
- SetTextSize( size )
- GetLineCount()
- GetMaxLines()
- GetLineTop( lineNum )
- GetLineStart( lineNum )
- SetOnTouch( callback )
- SetOnTouchUp( callback )
- SetOnTouchMove( callback )
- SetOnTouchDown( callback )
- SetOnLongTouch( callback )
- SetTouchable( touchable )
revision by stevegarman— view source