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. treeview copy/paste

treeview copy/paste

Scheduled Pinned Locked Moved C#
question
4 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.
  • X Offline
    X Offline
    xilefxilef
    wrote on last edited by
    #1

    Hi, I need to implement node copy/paste functionality in my treeview control. What is a good way of accomplishing this? Thanx

    C 1 Reply Last reply
    0
    • X xilefxilef

      Hi, I need to implement node copy/paste functionality in my treeview control. What is a good way of accomplishing this? Thanx

      C Offline
      C Offline
      Chals
      wrote on last edited by
      #2

      Hi, You can not "copy" nodes but you can clone them using the myTree.Nodes[i].Clone() method Playing with this you can implement what you need :)

      X 1 Reply Last reply
      0
      • C Chals

        Hi, You can not "copy" nodes but you can clone them using the myTree.Nodes[i].Clone() method Playing with this you can implement what you need :)

        X Offline
        X Offline
        xilefxilef
        wrote on last edited by
        #3

        Thanx, but if I'm looking for sort of 'simple' copy/paste, namely just duplicating a node visually using keys 'cntrl C' and 'cntrl V', do I need to catch a 'keyPress' event or is there another way of doing it?

        C 1 Reply Last reply
        0
        • X xilefxilef

          Thanx, but if I'm looking for sort of 'simple' copy/paste, namely just duplicating a node visually using keys 'cntrl C' and 'cntrl V', do I need to catch a 'keyPress' event or is there another way of doing it?

          C Offline
          C Offline
          Chals
          wrote on last edited by
          #4

          You can use the KeyDown event

          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