Window:onMove() event


This event is fired when the window position has been changed by the user or by setting the Window.x or Window.y properties.

Return value

The event returns no value.

Example

local ui = require "ui" -- create a window local win = ui.Window("Window:onMove() sample", 320, 200) local label = ui.Label(win, "Move the window !", 110, 75) -- set a onMove() event : display a status bar with the current window position function win:onMove() win:status("Window.x = "..self.x, "Window.y = "..self.y) end -- display the status bar for the first time win:onMove() win:show() while win.visible do ui.update() end