Entry:center() method


Centers the Entry on the parent widget.

Return value

This function returns no value.

Example

local ui = require "ui" -- create a simple Window local win = ui.Window("Entry:center() sample", 320, 200) local entry = ui.Entry(win, "Hello LuaRT !") ui.Button(win, "Center Entry", 112, 210).onClick = function (self) entry:center() end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible