Difference between revisions of "TextField.new"

From GiderosMobile
(removed language stuff)
m (Text replacement - "<source" to "<syntaxhighlight")
Line 6: Line 6:
 
=== Description ===
 
=== 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.
 
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.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
TextField.new(font,text,sample,layout)
 
TextField.new(font,text,sample,layout)
 
</source>
 
</source>

Revision as of 15:31, 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. <syntaxhighlight lang="lua"> TextField.new(font,text,sample,layout) </source>

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