Unit 'msegui' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#msegui]

twidget.paint

invalidate (called automatically, e.g. by setcaption) adds the widget's client area to its window's update region

Declaration

Source position: msegui.pas line 2355

public procedure twidget.paint(

  const canvas: tcanvas

); virtual;

Description

invalidate (called automatically, e.g. by setcaption) adds the widget's client area to its window's update region; once the main event queue is empty, the update regions of all windows are painted, widget by widget, bottom-up in z-order, by paint. If the widget's color is not cl_transparent, the area is first filled with that color; then, if active, frame is painted (filling its own client area with colorclient if that is not cl_transparent), then, if active, face; the widget's own content (e.g. a caption) is painted last, on top of that background. When code changes a widget's widgetrect directly rather than through a property that does it automatically, it must invalidate the old widgetrect before the change and the new one after, so both the vacated and the newly covered area get repainted.


Documentation generated on: 2026-10-03