Results 1 to 3 of 3

Thread: Read Treeview Nodes In Display Sequence

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318

    Cool

    I have a tv control which allows user to drag and drop
    nodes to other nodes.

    After they finish, how can I print the text according to
    the sequence that they are displayed on the screen?

    Also, can I use the indent property to knows the level
    of indentation they are?

    M Thanks


  2. #2
    Member
    Join Date
    Oct 2000
    Location
    Netherlands
    Posts
    54

    Wink Use FullPath property

    For determining the level of indentation you could use the FullPath property of a node. Count the number of occurences of the PathSeperator property of the treeview.

    I asume you want to rebuild the tree exactly the same way as you left it. Consider using the .Parent.Key property. Store the Parent.Key property of node and do this for every node. Set tvwChild and twvFist/Last with checking of a node has childs and store all node settings accordingly.

    I myself use a database to store all data but this is not a good procedure if you want to distribute your application over the Internet. I know all root nodes and just add nodes as twvchild to the right relative key.
    A mind is like a parachute, it has to open to let it work
    www.2beesoft.com for Icon Manager with over 20.000 free icons
    VB6 Ent. SP4, ASP, W2000/W98

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318

    Wink

    Thanks Berthil,

    I more or less can rebuild the tree now.

    But I found another problem:

    If I have 2 child to a parent, building the linking
    from child to parent is OK, but how about the relative
    position, ie. how can I know whether child A is before
    child B?

    Can you help?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width