Entry.constructor(parent, caption, [ x ], [ y ], [ width ], [ height ]) constructor
The Entry constructor returns a Entry value representing a static text area on the parent object.
Parameters
parent
An object that will own the Entry. Parent objects can be any of Window, Groupbox, TabItem and Panel
caption
A string representing the Entry's text.
x
An optional number that indicates the Entry horizontal position, in pixels. Zero means the left border of the parent.
y
An optional number that indicates the Entry vertical position, in pixels. Zero means the top border of the parent.
width
An optional number that indicates the Entry width in pixels, autosized to fit text content if omitted.
height
An optional number that indicates the Entry height in pixels, autosized to fit text content if omitted.
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("Entry.constructor() sample", 320, 200)
-- create a Entry on this window, with "LuaRT" as text, at the x position 110, and y position 80
local entry = ui.Entry(win, "LuaRT", 110, 80)
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible