Difference between revisions of "TextField.new"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/>
+
'''Class:''' [[TextField]]<br/>
=== <translate>Description</translate> ===
+
 
<translate><br />
+
=== Description ===
Creates a new [[Special:MyLanguage/TextField|TextField]] object with the specified font and text. Gideros runtime includes a<br />
+
Creates a new '''TextField''' object with the specified font and text. Gideros runtime includes a default font. If you specify ''nil'' for the font parameter while creating the '''TextField''' object, default font is used.
default font. If you specify ''nil'' for the font parameter while creating the [[Special:MyLanguage/TextField|TextField]] object, default font is used.<br />
+
<syntaxhighlight lang="lua">
<br /></translate>
+
TextField.new(font,text,sample,layout)
<source lang="lua">
+
</syntaxhighlight>
TextField.new(font,text,sample,layout)
+
 
</source>
+
=== Parameters ===
=== <translate>Parameters</translate> ===
+
'''font''': (FontBase) the font used for displaying the TextField object. If nil, default font is used<br/>
'''font''': (FontBase) <translate>The font used for displaying this [[Special:MyLanguage/TextField|TextField]] object. If nil, default font is used.</translate> <br/>
+
'''text''': (string) the text to be displayed '''optional'''<br/>
'''text''': (string, optional) <translate>The text to be displayed.</translate> <br/>
+
'''sample''': (string) sample to determine line height '''optional'''<br/>
'''sample''': (string) <translate>sample to determine line height</translate> '''optional'''<br/>
+
'''layout''': (table) layout parameters, see [[TextField:setLayout]] '''optional'''<br/>
'''layout''': (table) <translate>Layout parameters, see [[Special:MyLanguage/TextField:setLayout|TextField:setLayout]]</translate> '''optional'''<br/>
 
  
 
{{TextField}}
 
{{TextField}}

Latest revision as of 15:33, 13 July 2023


Available since: Gideros 2011.6
Class: TextField

Description

Creates a new TextField object with the specified font and text. Gideros runtime includes a default font. If you specify nil for the font parameter while creating the TextField object, default font is used.

TextField.new(font,text,sample,layout)

Parameters

font: (FontBase) the font used for displaying the TextField object. If nil, default font is used
text: (string) the text to be displayed optional
sample: (string) sample to determine line height optional
layout: (table) layout parameters, see TextField:setLayout optional