System.Windows.Forms.ComboBox.GetItemHeight Method

Returns the height of an item in the System.Windows.Forms.ComboBox.

Syntax

public int GetItemHeight (int index)

Parameters

index
The index of the item to return the height of.

Returns

The height, in pixels, of the item at the specified index.

Remarks

If ComboBox.DrawMode is not set to OwnerDrawVariable, the value of the index parameter is ignored because all items in a standard System.Windows.Forms.ComboBox are the same size. You can use this property when you are using an owner-drawn System.Windows.Forms.ComboBox to determine the size of any item within the System.Windows.Forms.ComboBox.

For more information about specifying the height for items in an owner-drawn list, see ComboBox.MeasureItem event.

Requirements

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