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. C#
  4. how to select an existing TreeNode

how to select an existing TreeNode

Scheduled Pinned Locked Moved C#
questiontutorial
3 Posts 2 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.
  • G Offline
    G Offline
    gerbenschmidt
    wrote on last edited by
    #1

    Hi, I am creating a windows application that has a custom treeview/listview windows explorer. How can I select the corresponding TreeNode of a selected ListView directory?

    L 1 Reply Last reply
    0
    • G gerbenschmidt

      Hi, I am creating a windows application that has a custom treeview/listview windows explorer. How can I select the corresponding TreeNode of a selected ListView directory?

      L Offline
      L Offline
      Laubi
      wrote on last edited by
      #2

      This is easy, the property SelectedNode (TreeView) can not only be read but also be written... treeView1.SelectedNode = treeView1.Nodes[213]; //treeView1.Focus();

      G 1 Reply Last reply
      0
      • L Laubi

        This is easy, the property SelectedNode (TreeView) can not only be read but also be written... treeView1.SelectedNode = treeView1.Nodes[213]; //treeView1.Focus();

        G Offline
        G Offline
        gerbenschmidt
        wrote on last edited by
        #3

        Hi, I can follow that....but treeView1.Nodes[213] does not belong to the Selected ListView Item. how can I find the Node that belongs to this ListView Item? (ProjectTreeView.SelectedNode.FullPath + "\\" + ProjectListView.SelectedItems[0].Text);

        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