ListBox.GetItemHeight(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈