RAD Studio
ContentsIndex
PreviousUpNext
Drawing Owner-drawn Items

When you indicate that a control is owner-drawn, either by setting a property or supplying a custom draw event handler, the control is no longer drawn on the screen. Instead, the operating system generates events for each visible item in the control. Your application handles the events to draw the items.

To draw the items in an owner-draw control, do the following for each visible item in the control. Use a single event handler for all items.

  1. Size the item, if needed. Items of the same size (for example, with a list box style of lsOwnerDrawFixed), do not require sizing.
  2. Draw the item.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!