Export (0) Print
Expand All

ListViewItem.Focused Property

Gets or sets a value indicating whether the item has focus within the list view control.

[Visual Basic]
Public Property Focused As Boolean
[C#]
public bool Focused {get; set;}
[C++]
public: __property bool get_Focused();
public: __property void set_Focused(bool);
[JScript]
public function get Focused() : Boolean;
public function set Focused(Boolean);

Property Value

true if the item has focus; otherwise, false.

Remarks

Because a ListView control has no directly editable areas, except 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 focused item. Although an item can be the one displaying the focus reticle, it might not actually be a selected item in the ListView. You can use this property to determine if the item is currently the focused item in the ListView control that contains it. If the ListViewItem is not associated with a ListView control, then this property will return false.

The ListView control provides a property called FocusedItem that allows you to determine which ListViewItem in the ListView has the focus.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ListViewItem Class | ListViewItem Members | System.Windows.Forms Namespace | FocusedItem

Show:
© 2014 Microsoft