Panel:onMove() event


This event is fired when the Panel position has changed.

Return value

The event returns no value.

Example

local ui = require "ui" -- create a fixed Window local win = ui.Window("Panel:onMouseDown() event sample", "fixed", 320, 200) -- create a Panel local panel = ui.Panel(win, 0, 0, 100, 100) panel.bgcolor = 0xF0A000 panel:center() ui.Button(panel, "Move", 16, 36).onClick = function() panel.x = 0 end function panel:onMove(x, y) win:status("Panel position is "..self.x..", "..self.y) end ui.run(win):wait()