ListBox.GetItemHeight(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回项在 . 中的 ListBox高度。
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 指定值小于零或大于项计数。
注解
DrawMode如果未将属性设置为DrawMode.OwnerDrawVariable,则忽略索引参数的值,因为标准ListBox中的所有项的大小都相同。 使用所有者绘制 ListBox 来确定其中 ListBox任何项的大小时,可以使用此属性。