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
Checked

The item is checked. Only menu controls use this value.

ComboBoxEdit

The item is the editing portion of a ComboBox.

Default

The item is in its default visual state.

Disabled

The item is unavailable.

Focus

The item has focus.

Grayed

The item is grayed. Only menu controls use this value.

HotLight

The item is being hot-tracked, that is, the item is highlighted as the mouse pointer passes over it.

Inactive

The item is inactive.

NoAccelerator

The item displays without a keyboard accelerator.

NoFocusRect

The item displays without the visual cue that indicates it has focus.

None

The item currently has no state.

Selected

The 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
Available since 1.1
Return to top
Show: