Window:onResize() event


This event is fired when the window has been resized by the user or by setting the Window.width or Window.height properties.

Return value

The event returns no value.

Example

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