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 / C++ / MFC
  4. how to add a list of file paths to a tree as quickly as possible?

how to add a list of file paths to a tree as quickly as possible?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialdesigndata-structuresquestiondiscussion
2 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.
  • S Offline
    S Offline
    sheny
    wrote on last edited by
    #1

    I have a huge list of file paths and i have to insert them into a tree (TreeView as user interface)! Example of a list: C:\Folder\data.011 C:\New Folder\settings.ini C:\Folder\task.dat C:\My Documents\manual.pdf C:\Windows\wallpaper.jpg ..... ..... ..... 20 000 Files and Folders Which is the fastest way to visualize the list in a TreeView? Any thoughts are appreciated!

    modified on Monday, September 8, 2008 7:29 AM

    D 1 Reply Last reply
    0
    • S sheny

      I have a huge list of file paths and i have to insert them into a tree (TreeView as user interface)! Example of a list: C:\Folder\data.011 C:\New Folder\settings.ini C:\Folder\task.dat C:\My Documents\manual.pdf C:\Windows\wallpaper.jpg ..... ..... ..... 20 000 Files and Folders Which is the fastest way to visualize the list in a TreeView? Any thoughts are appreciated!

      modified on Monday, September 8, 2008 7:29 AM

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      One solution would be to not show the updated tree until it has been fully populated. Another (faster) approach is to only show those nodes that are actually visible. In other words, don't show a node's contents until it has been expanded.

      "Love people and use things, not love things and use people." - Unknown

      "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

      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