System.Windows.Forms.ListBox.GetItemHeight Method

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

Syntax

public int GetItemHeight (int index)

Parameters

index
The zero-based index of the item to return the height for.

Returns

The height, in pixels, of the specified item.

Remarks

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

Requirements

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