Picture:onCreate() event


This event is fired when the Picture object has just been created (just after the Picture:constructor() call).

This event is particularly interesting when you want to initialize its properties.

Return value

The event returns no value.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Picture:onCreate() event sample", 340, 200) -- create an empty Picture Object local picture = ui.Picture(win, "", 50,50) -- Picture:onCreate event to set the font properties function picture:onCreate() picture:load("examples/LuaRT.png") picture:resize(0.5) end win:show() while win.visible do ui.update() end