|
-
Nov 2nd, 2000, 02:31 AM
#1
Thread Starter
Lively Member
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
-
Nov 2nd, 2000, 05:50 AM
#2
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|