Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 2.0
ListView Class
ListView Properties
 HotTracking Property

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
.NET Framework Class Library
ListView.HotTracking Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets a value indicating whether the text of an item or subitem has the appearance of a hyperlink when the mouse pointer passes over it.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Visual Basic (Declaration)
Public Property HotTracking As Boolean
Visual Basic (Usage)
Dim instance As ListView
Dim value As Boolean

value = instance.HotTracking

instance.HotTracking = value
C#
public bool HotTracking { get; set; }
C++
public:
property bool HotTracking {
    bool get ();
    void set (bool value);
}
J#
/** @property */
public boolean get_HotTracking ()

/** @property */
public void set_HotTracking (boolean value)
JScript
public function get HotTracking () : boolean

public function set HotTracking (value : boolean)

Property Value

true if the item text has the appearance of a hyperlink when the mouse passes over it; otherwise, false. The default is false.

Enabling hot tracking willcause the Activation property to be set to OneClick andtheHoverSelection property to be set to true. In addition, run-time label editing is not allowed when hot tracking is enabled.

The following code example demonstrates a ListView with hot tracking enabled. To run this example, paste the following code into a Windows Form and call the InitializeHotTrackingListView method from the form's constructor or Load event handler.

Visual Basic
Private list As New ImageList()
Private hotTrackinglistView As New ListView()


Private Sub InitializeHotTrackingListView()
    list.Images.Add(New Bitmap(GetType(Button), "Button.bmp"))
    hotTrackinglistView.SmallImageList = list
    hotTrackinglistView.Location = New Point(20, 20)
    hotTrackinglistView.View = View.SmallIcon
    Dim listItem1 As New ListViewItem("Short", 0)
    Dim listItem2 As New ListViewItem("Tiny", 0)
    hotTrackinglistView.Items.Add(listItem1)
    hotTrackinglistView.Items.Add(listItem2)
    hotTrackinglistView.HotTracking = True
    Me.Controls.Add(hotTrackinglistView)

End Sub
C#
private ImageList list = new ImageList();
private ListView hotTrackinglistView = new ListView();

private void InitializeHotTrackingListView(){
    list.Images.Add(new Bitmap(typeof(Button), "Button.bmp"));
    hotTrackinglistView.SmallImageList = list;
    hotTrackinglistView.Location = new Point(20, 20);
    hotTrackinglistView.View = View.SmallIcon;
    ListViewItem listItem1 = new ListViewItem("Short", 0 );
    ListViewItem listItem2 = new ListViewItem("Tiny", 0);
    hotTrackinglistView.Items.Add(listItem1);
    hotTrackinglistView.Items.Add(listItem2);
    hotTrackinglistView.HotTracking = true;
    this.Controls.Add(hotTrackinglistView);
}

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker