Home > Language Reference > Classes > UserControl
Paint Event
Event raised when the control needs to be redrawn.
Syntax
Protected Event Paint()
Remarks
The Paint event is raised by the system each time the appearance of a control needs to be updated. This takes places of course the first time the control is displayed, but can also occur at any moment, for example when the control is covered up by a dialog box that is then closed.
Apart from certain cases, all the code necessary for drawing the control should be located in its Paint event handler. If not, your control may not be displayed correctly.
The valid drawing zone expressed in standard coordinates is defined by (0,0) and ( Width - 1, Height - 1). Any drawing outside the control is clipped.
Note: the graphic instructions buffer is automatically flushed after this event is sent. It is not necessary therefore to call the Flush method in your drawing routines.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |