Widget Handlers
There are five core handlers that any widget developer should implement:
- OnPaint: Sent to your widget whenever LiveCode requires it to redraw. The performance of your widget is tied primarily to this handler and should be kept as efficient as possible.
- OnCreate: Sent to your widget when it is first created by LiveCode. This can be used to initialise default data and where applicable, reduce the burden for calculating constants etc in the onPaint handler.
- OnGeometryChanged: Sent when the control is changed in size.
- OnSave: Sent when your widget is about to be destroyed and enables the widget to save data set on the widget.
- OnLoad: Sent when your widget is created and enables the widget to retrieve data saved on the widget.|