Edit:center()method


Centers the Edit on the parent widget.

Return value

This function returns no value.

Example

--! luart-extensions import ui -- create a simple Window local win = ui.Window("Edit:center() sample", 320, 280) local edit = ui.Edit(win, "Hello LuaRT !") ui.Button(win, "Center Edit", 112, 250).onClick = function (self) edit:center() end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible