Member variable XbpCombobox():drawMode Foundation

Specifies the drawing mode of the combobox object.

Attribute: EXPORTED
Data type: Numeric (XBP_DRAW_NORMAL)

The :drawMode instance variable specifies the mode used to display the XbpCombobox object on the screen. In the default draw mode (XBP_DRAW_NORMAL), the operating system takes full control over the drawing process. In this mode, a combo box object is displayed using default imagery and the object's appearance cannot be controlled by the application. However, this default behavior can be overridden. If the value XBP_DRAW_OWNER or XBP_DRAW_OWNERADVANCED is assigned to the :drawMode instance variable, no drawing is performed by the operating system. Instead, the Xbase++ runtime system uses xbeP_MeasureItem and xbeP_DrawItem events to notify the application about the display state of the combo box object. The application is responsible for processing these events, and for creating the on-screen visualization of the combo box items. For this, the Graphics Engine commands can be used.

This protocol is called owner-drawing because displaying the items of the combo box is the responsibility of the object's owner. Using owner-drawing, an application can customize the visual appearance and the behavior of an XbpCombobox object.

Possible values for instance variable :drawMode
Value Effect
XBP_DRAW_NORMAL *) Combobox items are drawn by the system
XBP_DRAW_OWNER Combobox items are drawn by the application. All have the same height.
XBP_DRAW_OWNERADVANCED Combobox items are drawn by the application. Items have variable height.
  1. Default value

The drawing mode must be assigned to :drawMode before the method :create() is executed.

Owner-drawing is only supported for comboboxes of type XBPCOMBO_DROPDOWNLIST.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.