Skip to main content
A newer version of this page is available. .

RepositoryItemCheckedComboBoxEdit.DrawListBoxItem Event

Allows you to manually paint CheckedComboBoxEdit items.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

[DXCategory("Events")]
public event ListBoxDrawItemEventHandler DrawListBoxItem

Event Data

The DrawListBoxItem event's data class is ListBoxDrawItemEventArgs. The following properties provide information specific to this event:

Property Description
AllowDrawSkinBackground Gets or sets whether the item background is colored according to the currently applied skin.
Appearance Gets the appearance settings used to paint the item currently being processed.
Bounds Gets the bounding rectangle of the item being painted.
Cache Gets an object which specifies the storage for the most used pens, fonts and brushes.
Graphics Gets an object used to paint an item.
Handled Gets or sets a value specifying whether default painting is required.
Index Gets the index of the item being painted.
Item Gets the value of the processed item.
State Gets the state of the item being painted.

The event data class exposes the following methods:

Method Description
DefaultDraw() Performs default painting of an element.
GetItemInfo() This member supports the internal infrastructure, and is not intended to be used directly from your code.

Remarks

The list box control enables you to custom paint its items. Handle the DrawListBoxItem event to override default item painting. This event is raised each time an item is about to be painted. The event parameter’s properties allow you to define the object used to paint the item’s boundaries, style and the index of the item. To get the item’s state (selected, checked, grayed, inactive, etc) and the value of the item being drawn, use the ListBoxDrawItemEventArgs.State and ListBoxDrawItemEventArgs.Item properties respectively.

Important

You must set the ListBoxDrawItemEventArgs.Handled property to true to override the default painting.

See Also