ListViewItem::GetSubItemAt Method (Int32, Int32)


Returns the subitem of the ListViewItem at the specified coordinates.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

ListViewItem::ListViewSubItem^ GetSubItemAt(
	int x,
	int y


Type: System::Int32

The x-coordinate.

Type: System::Int32

The y-coordinate.

Return Value

Type: System.Windows.Forms::ListViewItem::ListViewSubItem^

The ListViewItem::ListViewSubItem at the specified x- and y-coordinates.

The GetSubItemAt method will return null if the ListView is not in Details view, or there is not a ListViewItem::ListViewSubItem located at the specified point.

The following code example demonstrates how to use the GetSubItemAt method. To run this code, paste it into a Windows Form and call InitializeListView1 from the form's constructor or Load event-handling method.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top