Window:center() method
Centers the Window on the parent widget.
Return value
This function returns no value.Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("Window:center() sample", 320, 200)
ui.Button(win, "Center Window", 110, 90).onClick = function (self)
win:center()
end
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible