System.Windows.Forms.DrawMode Enumeration

Specifies how the elements of a control are drawn.

Syntax

public enum DrawMode

Remarks

This enumeration is used by members such as ListBox.DrawMode in the System.Windows.Forms.ListBox, System.Windows.Forms.CheckedListBox, and System.Windows.Forms.ComboBox classes.

You can override the drawing of some controls or certain elements. This enumeration is used to specify if a control is drawn by the operating system or if your own code handles the drawing of the control.

Note:

The System.Windows.Forms.CheckedListBox class only supports DrawMode.Normal; owner draw modes are ignored.

For more information about using the System.Windows.Forms.DrawMode enumeration, see the MeasureItem and DrawItem events, and the ItemHeight property.

Members

Member NameDescription
Normal

All the elements in a control are drawn by the operating system and are of the same size.

OwnerDrawFixed

All the elements in the control are drawn manually and are of the same size.

OwnerDrawVariable

All the elements in the control are drawn manually and can differ in size.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0