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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Right clicking on treeview node won't select it so contextmenus don't work right

Right clicking on treeview node won't select it so contextmenus don't work right

Scheduled Pinned Locked Moved Visual Basic
phpcomhelpquestion
3 Posts 3 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.
  • O Offline
    O Offline
    o m n i
    wrote on last edited by
    #1

    Hi. I'm making a treeview and the items on it are dynamically assigned a context menu and info about the node is used in an operation from the menu. My code works fine except if you left click item 1, then right click item 2, it opens the menu as if item 1 was selected. It only works correctly if you left click item 2 before right clicking it. Any way to fix this?

    Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php

    D 1 Reply Last reply
    0
    • O o m n i

      Hi. I'm making a treeview and the items on it are dynamically assigned a context menu and info about the node is used in an operation from the menu. My code works fine except if you left click item 1, then right click item 2, it opens the menu as if item 1 was selected. It only works correctly if you left click item 2 before right clicking it. Any way to fix this?

      Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Set the right clicked node as selected node in NodeMouseClick event.

      B 1 Reply Last reply
      0
      • D dan sh

        Set the right clicked node as selected node in NodeMouseClick event.

        B Offline
        B Offline
        Bahram Zarrin
        wrote on last edited by
        #3

        use the context menu property of the treeview. bah10z

        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