ListView.GetItemRect 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.
Retrieves the bounding rectangle for an item within the control.
Overloads
GetItemRect(Int32) |
Retrieves the bounding rectangle for a specific item within the list view control. |
GetItemRect(Int32, ItemBoundsPortion) |
Retrieves the specified portion of the bounding rectangle for a specific item within the list view control. |
GetItemRect(Int32)
Retrieves the bounding rectangle for a specific item within the list view control.
public:
System::Drawing::Rectangle GetItemRect(int index);
public System.Drawing.Rectangle GetItemRect (int index);
member this.GetItemRect : int -> System.Drawing.Rectangle
Public Function GetItemRect (index As Integer) As Rectangle
Parameters
- index
- Int32
The zero-based index of the item within the ListView.ListViewItemCollection whose bounding rectangle you want to return.
Returns
A Rectangle that represents the bounding rectangle of the specified ListViewItem.
Remarks
The bounding rectangle returned by this version of the GetItemRect method represents the entire item, including the icon, item text, and subitem text. To specify a specific portion of the item's bounding rectangle, use the other version of the GetItemRect method.
See also
Applies to
GetItemRect(Int32, ItemBoundsPortion)
Retrieves the specified portion of the bounding rectangle for a specific item within the list view control.
public:
System::Drawing::Rectangle GetItemRect(int index, System::Windows::Forms::ItemBoundsPortion portion);
public System.Drawing.Rectangle GetItemRect (int index, System.Windows.Forms.ItemBoundsPortion portion);
member this.GetItemRect : int * System.Windows.Forms.ItemBoundsPortion -> System.Drawing.Rectangle
Public Function GetItemRect (index As Integer, portion As ItemBoundsPortion) As Rectangle
Parameters
- index
- Int32
The zero-based index of the item within the ListView.ListViewItemCollection whose bounding rectangle you want to return.
- portion
- ItemBoundsPortion
One of the ItemBoundsPortion values that represents a portion of the ListViewItem for which to retrieve the bounding rectangle.
Returns
A Rectangle that represents the bounding rectangle for the specified portion of the specified ListViewItem.
Remarks
The bounding rectangle returned by this version of the GetItemRect method represents only the section of the item specified in the portion
parameter. To return the bounding rectangle of the entire item, use the other version of the GetItemRect method.
See also
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기