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