TextField:setText: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''Class:''' [[TextField]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/>
 
=== <translate>Description</translate> ===
=== Description ===
<translate><br />
Sets the text to be displayed.
Sets the text to be displayed.<br />
<syntaxhighlight lang="lua">
<br /></translate>
TextField:setText(text)
<source lang="lua">
</syntaxhighlight>
TextField:setText(text)
 
</source>
Gideros accepts special escape sequences within the text to modify rendering, in the form of \e[key1=value1,key2=value2,...].
=== <translate>Parameters</translate> ===
 
'''text''': (string) <translate>The text to be displayed.</translate> <br/>
Value can be omitted (and the equal sign too in this case), in which case the effect specified by the key is reset to its default value.
 
Accepted keys are:
* color: sets the color of the next characters, in the form #rgb, #rgba, #rrggbb or #rrggbbaa
* font: specifies the font to use, relevant if the font is a [[CompositeFont]]
 
=== Parameters ===
'''text''': (string) the text to be displayed<br/>


{{TextField}}
{{TextField}}

Latest revision as of 07:18, 18 October 2024

Available since: Gideros 2011.6
Class: TextField

Description

Sets the text to be displayed.

TextField:setText(text)

Gideros accepts special escape sequences within the text to modify rendering, in the form of \e[key1=value1,key2=value2,...].

Value can be omitted (and the equal sign too in this case), in which case the effect specified by the key is reset to its default value.

Accepted keys are:

  • color: sets the color of the next characters, in the form #rgb, #rgba, #rrggbb or #rrggbbaa
  • font: specifies the font to use, relevant if the font is a CompositeFont

Parameters

text: (string) the text to be displayed