Export (0) Print
Expand All

ListView.FocusedItem Property

Gets or sets the item in the control that currently has focus.

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

[BrowsableAttribute(false)]
public ListViewItem FocusedItem { get; set; }

Property Value

Type: System.Windows.Forms.ListViewItem
A ListViewItem that represents the item that has focus, or null if no item has the focus in the ListView.

The FocusedItem property returns the ListViewItem that represents the item currently displaying the focus rectangle for the ListView control. Because a ListView control has no directly editable areas other than the items it displays, when the ListView control has focus, an item within the ListView displays the focus reticle around its item text. Typically, the last selected item in the ListView control is the item with focus. Although an item may be the one displaying the focus reticle, it may not actually be a selected item in the ListView. Use the SelectedItems or SelectedIndices properties to obtain the selected items in the ListView control, the FocusedItem property is not necessarily selected. You can use the FocusedItem property to determine which item was last clicked in the ListView control, regardless of selection state.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft