Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. TreeView NodeMouseHover Event

TreeView NodeMouseHover Event

Scheduled Pinned Locked Moved C#
data-structureshelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vhassan
    wrote on last edited by
    #1

    Hi, I want nodes of tree view should behave like hyperlink. This I achieved by setting HotTracking property of tree view asTrue. Now I want to change my Cursor as I hover over the Node text not the full row range. Firstly: I used NodeMouseHover event but cannot change the cursor to default. Secondly:

    private void treeView1_MouseMove(object sender, MouseEventArgs e)
    {
    if (treeView1.GetNodeAt(e.X, e.Y) == null)
    treeView1.Cursor = Cursors.Default;
    else
    treeView1.Cursor = Cursors.Hand;
    }

    I used above TreeView MouseMove event. Using this I get default cursor when I hover over blank space of treeview but the cursor changes to hand when the pointer is not even over text and Node is not even underlined (using HotTracking). Please help me to get cursor change only on text of Node.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups