Results 1 to 2 of 2

Thread: Treeview object

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    jerusalem
    Posts
    72

    Angry

    I have a "Treeview" object and I want to know if there
    is a function that can return the level that I locate.
    For example: there are 3 levels for a specific treeview
    and my location is on an item that exists on the second level.
    I'm looking for a function that can return to me - "2".
    Thank you
    Royi

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

    Wink Use Fulpath property

    Just use the Fullpath property of the selected item and set the PathSeperator property of the treeview to whatever you want it to be (most likely '/')

    On the assumption you don't use the path seperator in the node text, you can easily count the level of the node by counting the number of occurences of the path seperator in the FullPath. Just write a function for that and feed it with FullPath string.

    Maybe there's a better way but this one works too.
    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

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