UI.TextField
From GiderosMobile
Available since: Gideros 2023.1
Class: UI
Description
Creates TextField widgets. The widget can be a TextField, a ButtonTextFieldCombo, a ButtonTextField or a PasswordField.
UI.TextField.new(text,layout,minwidth,minheight,pass,textType)
UI.ButtonTextFieldCombo.new(text,layout,minwidth,minheight,pass,textType)
UI.ButtonTextField.new(text,layout,minwidth,minheight,pass,textType)
UI.PasswordField.new(text,layout,minwidth,minheight,pass,textType)
Parameters
text: (bool) the TextField widget text
layout: (string) the TextField widget layout
minwidth: (number) the TextField widget minimum width
minheight: (number) the TextField widget minimum height
pass: (string) the TextField widget hiding symbol
textType: (number) the TextField widget text type, see Application Constants
Examples
TextField
local gui = UI.TextField.new("hello Gideros UI", nil, 64, 64, nil, Application.TEXTINPUT_CLASS_TEXT)
gui:setDimensions(256, 96)
gui:setColor(0x5c5c5c)
gui:setPosition(50, 50)
gui:setTipText("some tip text")
local screen=UI.Screen.new() -- needed to add the TextField
screen:ui(gui)
ButtonTextFieldCombo
local gui = UI.ButtonTextFieldCombo.new("hello Gideros X", nil, 64, 64, nil, Application.TEXTINPUT_CLASS_TEXT)
gui:setDimensions(256, 96)
gui:setColor(0x5c5c5c)
gui:setPosition(50, 50)
local screen=UI.Screen.new() -- needed to add the TextField
screen:ui(gui)
ButtonTextField
local gui = UI.ButtonTextField.new("hello Gideros X", nil, 64, 64, nil, Application.TEXTINPUT_CLASS_TEXT)
gui:setDimensions(256, 96)
gui:setColor(0x5c5c5c)
gui:setPosition(50, 50)
local screen=UI.Screen.new() -- needed to add the TextField
screen:ui(gui)
PasswordField
local gui = UI.PasswordField.new("password", nil, 64, 64, nil, Application.TEXTINPUT_CLASS_TEXT)
gui:setDimensions(256, 96)
gui:setColor(0x5c5c5c)
gui:setPosition(50, 50)
gui:setTipText("enter password")
local screen=UI.Screen.new() -- needed to add the TextField
screen:ui(gui)