Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Root of TreeView

Posted on 2003-02-25
2
Medium Priority
?
288 Views
Last Modified: 2010-05-01
Hi,

my TreeView consists of 3 Roots and many children, some children could be parents of other children and so on.
How can I define the ROOT of any selected child
the code olease

Thanx
0
Comment
Question by:toni2002
  • 2
2 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 200 total points
ID: 8020267
Function GetRootNode(ByVal TreeNode As Node) As Node
    Do Until TreeNode.Parent Is Nothing
        Set TreeNode = TreeNode.Parent
    Loop

    Set GetRootNode = tvwNode
End Function
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 8020271
should read:
Set GetRootNode = TreeNode
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question