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)

[<FlagsAttribute>]
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.5.3, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft