Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

DrawItemState Enumeration

Specifies the state of an item that is being drawn.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

type DrawItemState

Member nameDescription
CheckedThe item is checked. Only menu controls use this value.
ComboBoxEditThe item is the editing portion of a ComboBox.
DefaultThe item is in its default visual state.
DisabledThe item is unavailable.
FocusThe item has focus.
GrayedThe item is grayed. Only menu controls use this value.
HotLightThe item is being hot-tracked, that is, the item is highlighted as the mouse pointer passes over it.
InactiveThe item is inactive.
NoAcceleratorThe item displays without a keyboard accelerator.
NoFocusRectThe item displays without the visual cue that indicates it has focus.
NoneThe item currently has no state.
SelectedThe item is selected.

This enumeration is used by members such as DrawItemEventArgs.State.

The following code example demonstrates using the Graphics property to perform custom drawing of the items in a ListBox.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft