Difference between revisions of "TextField:setText"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' Gideros 2011.6<br/> | |
− | ''' | + | '''Class:''' [[TextField]]<br/> |
− | ''' | + | |
− | === | + | === Description === |
− | + | Sets the text to be displayed. | |
− | Sets the text to be displayed.<br /> | + | 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.<br /> |
− | + | Accepted keys are: | |
− | < | + | * color: Set the color of the next characters, in the form #rgb, #rgba, #rrggbb or #rrggbbaa |
− | + | * font: Specify the font to use, relevant if the font is a [[CompositeFont]] | |
− | </ | + | |
− | === | + | <syntaxhighlight lang="lua"> |
− | '''text''': (string) | + | TextField:setText(text) |
+ | </syntaxhighlight> | ||
+ | |||
+ | === Parameters === | ||
+ | '''text''': (string) the text to be displayed<br/> | ||
{{TextField}} | {{TextField}} |
Latest revision as of 15:33, 13 July 2023
Available since: Gideros 2011.6
Class: TextField
Description
Sets the text to be displayed.
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: Set the color of the next characters, in the form #rgb, #rgba, #rrggbb or #rrggbbaa
- font: Specify the font to use, relevant if the font is a CompositeFont
TextField:setText(text)
Parameters
text: (string) the text to be displayed
- TextField
- TextField.new
- TextField:getLayout
- TextField:getLetterSpacing
- TextField:getLineHeight
- TextField:getPointFromTextPosition
- TextField:getSample
- TextField:getText
- TextField:getTextColor
- TextField:getTextPositionFromPoint
- TextField:setFont
- TextField:setLayout
- TextField:setLetterSpacing
- TextField:setSample
- TextField:setText
- TextField:setTextColor