Camera:onCreate()event

widget only

This event is only available when the ui module is loaded before capture and Camera is used as a widget.
This event is fired when the Camera widget has just been created, right after the constructor returns. It is a good place to initialize widget properties.

Return value

The event returns no value.

Example

--! luart-extensions import ui, capture local win = ui.Window("Camera:onCreate() sample", "fixed", 640, 520) local cam = ui.Camera(win, 10, 10, 620, 460) function cam:onCreate() self.tooltip = "Camera ready" self.cursor = "cross" end await win:showasync()