संपादित करें

इसके माध्यम से साझा किया गया


ListBox.GetItemHeight(Int32) Method

Definition

Returns the height of an item in the ListBox.

public:
 int GetItemHeight(int index);
public int GetItemHeight (int index);
member this.GetItemHeight : int -> int
Public Function GetItemHeight (index As Integer) As Integer

Parameters

index
Int32

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

Returns

The height, in pixels, of the specified item.

Exceptions

The specified value of the index parameter is less than zero or greater than the item count.

Remarks

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

Applies to