Skip to main content

Painter and Painter Class

Each editing control (or UI element in sophisticated container controls) has its own painter – an object (a painter class instance) that paints a control on a specific canvas based on the control’s visual settings – colors, text styles, size, etc. Painter classes provide members that allow Developer Express controls to draw primitives when rendering control elements (such as control background, buttons, hint boxes, images, etc.) on a graphic surface. Painter class members include class methods that you can call when custom painting controls using OnCustomDraw~ events. To learn more about these events, refer to the corresponding topics.

Certain calculations of control or element visual settings (such as the element position within a control) may take a while during painting. To ensure smooth painting, all calculations are performed on demand and results are stored within the ViewInfo objects, which are then used by painters.