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. Tree Control problem

Tree Control problem

Scheduled Pinned Locked Moved C / C++ / MFC
questiondata-structuresarchitecturehelp
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.
  • A Offline
    A Offline
    Abhijeet Pathak
    wrote on last edited by
    #1

    Hi, I have a tree control in document/view architecture. When an item is collapsed and expanded by clicking + sign, all children nodes are re-enumerated and added. This works fine when I collapse and expand any item by hand (manually). But if i do it programatically, i.e. by sending TVE_EXPAND, and TVE_COLLAPSE messages the child nodes are just made invisible and visible again. How do i simulate a real collapse and expand to a node? Thanks

    M 1 Reply Last reply
    0
    • A Abhijeet Pathak

      Hi, I have a tree control in document/view architecture. When an item is collapsed and expanded by clicking + sign, all children nodes are re-enumerated and added. This works fine when I collapse and expand any item by hand (manually). But if i do it programatically, i.e. by sending TVE_EXPAND, and TVE_COLLAPSE messages the child nodes are just made invisible and visible again. How do i simulate a real collapse and expand to a node? Thanks

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      a_b_pathak wrote:

      When an item is collapsed and expanded by clicking + sign, all children nodes are re-enumerated and added.

      Huh ??? me not understand what you are writing; what do you mean by re-enumerated ? Are you filling the children as soon as you expand the parent or is the tree completely filled at some point ? When the + is clicked, the sub-tree will either collapse and will hide the items (children) under that parent ITEM or will expand and show all items (children) under that parent ITEM. If the children are already inserted they will only be shown/hide depending on the collapse state of the parent.


      Maximilien Lincourt Your Head A Splode - Strong Bad

      A 1 Reply Last reply
      0
      • M Maximilien

        a_b_pathak wrote:

        When an item is collapsed and expanded by clicking + sign, all children nodes are re-enumerated and added.

        Huh ??? me not understand what you are writing; what do you mean by re-enumerated ? Are you filling the children as soon as you expand the parent or is the tree completely filled at some point ? When the + is clicked, the sub-tree will either collapse and will hide the items (children) under that parent ITEM or will expand and show all items (children) under that parent ITEM. If the children are already inserted they will only be shown/hide depending on the collapse state of the parent.


        Maximilien Lincourt Your Head A Splode - Strong Bad

        A Offline
        A Offline
        Abhijeet Pathak
        wrote on last edited by
        #3

        Oh, i'm actually showing contents of file system in treeview. So, every time a node is collapsed and expanded, the subfolders are re-enumerated and added. This will let user see if new folders have been created.

        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