語言

ComboBox.GetItemHeight(Int32) 方法

定義

回傳 中項目 ComboBox的高度。

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

參數

index
Int32

項目的索引,回傳 的高度。

傳回

項目在指定索引處的高度(以像素為單位)。

例外狀況

這個數字 index 小於零。

-或-

這 index 比清單中項目的數量還要多。

備註

若 DrawMode 未設為 OwnerDrawVariable, index 則參數值會被忽略,因為標準 ComboBox 中的所有項目大小相同。 當你使用擁有者抽取 ComboBox 圖來判斷 ComboBox。

欲了解更多關於指定擁有者繪製清單中項目高度的資訊,請參見 MeasureItem 事件。

適用於