DrawListViewSubItemEventArgs.DrawFocusRectangle(Rectangle) 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.
Draws a focus rectangle for the ListViewItem.ListViewSubItem if the parent ListViewItem has focus.
public:
void DrawFocusRectangle(System::Drawing::Rectangle bounds);
public void DrawFocusRectangle (System.Drawing.Rectangle bounds);
member this.DrawFocusRectangle : System.Drawing.Rectangle -> unit
Public Sub DrawFocusRectangle (bounds As Rectangle)
Parameters
- bounds
- Rectangle
The area within which to draw the focus rectangle.
Remarks
Use this method to draw a standard focus rectangle around the subitem. The focus rectangle is drawn one pixel inside the area specified by the bounds
parameter. It is drawn only when the parent item has focus, so you do not need to check the focus state of the item before you call this method.
You might want to draw the focus rectangle only around the first subitem (that is, the parent item, which is displayed in the first column) rather than drawing it around every subitem of an item. This corresponds to the normal behavior of a ListView control when the ListView.FullRowSelect property is set to false
. To draw the focus rectangle around the first subitem, call the DrawFocusRectangle method only when the ColumnIndex value is 0.
The ListView control does not provide the ability to select individual subitems, but if you want to implement subitem selection yourself, you can use this method to draw the focus rectangle around a subitem other than the first one.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기