Skip to main content

ViewInfo

ViewInfo contains the essential painting information about a control’s UI element used by control and element painters. If any visual element setting is changed, ViewInfo is immediately recalculated.

The information stored in a ViewInfo object includes:

  • The bounding rectangle, painter class, size, and position parameters;

  • Colors and font settings;

  • Various element-specific parameters, including HitTest.

Not only painters use ViewInfo objects. OnCustomDraw~ event handlers can use it as well. The OnCustomDraw~ event (if available for a specific element) occurs when the element is about to be painted. This allows you to completely redraw this element. As a rule, ViewInfo of the painted control or element is passed as an event parameter. So you can use it for easy access and modification of various visual settings. To learn more about OnCustomDraw~ events, refer to the corresponding topics.