Panel:onResize() event


This event is fired when the Panel has been resized.

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, "To the left", 5, 36).onClick = function() panel.align = "left" end function panel:onResize() win:status("Panel size is "..self.width.." x "..self.height) end panel:onResize() ui.run(win):wait()