Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TreeView example Please.

Posted on 2000-03-17
1
Medium Priority
?
186 Views
Last Modified: 2010-05-02
Hi would anyone have a treeview example how to build nodes ? I tried to find an example on msdn i found some but they didn't explain things well. I need example how to build parent nodes and child. Thanks .
0
Comment
Question by:vbRetard
1 Comment
 
LVL 9

Accepted Solution

by:
Ruchi earned 60 total points
ID: 2629880
I have an example.... Make sure that you put ImageList and TreeView controls on the form.

For ImageList -- 3 images -- label player, check, diamond in the key box.


Option Explicit

Private Sub Form_Load()
Dim nodBB As Node

'Create league
Set nodBB = tvwBaseball.Nodes.Add(, , "Shelby", "North Shelby", "Diamond")
nodBB.Expanded = True
nodBB.Sorted = True

'Create Teams
tvwBaseball.Nodes.Add "Shelby", tvwChild, "Cubs", "Cubs", "Diamond", "Check"
tvwBaseball.Nodes.Add "Shelby", tvwChild, "Marlins", "Marlins", "Diamond", "Check"
tvwBaseball.Nodes.Add "Shelby", tvwChild, "Braves", "Braves", "Diamond", "Check"
tvwBaseball.Nodes.Add "Shelby", tvwChild, "Yankees", "Yankees", "Diamond", "Check"
tvwBaseball.Nodes.Add "Shelby", tvwChild, "Reds", "Reds", "Diamond", "Check"

'Add Players
tvwBaseball.Nodes.Add "Cubs", tvwChild, "Eric", "Eric", "Player"
tvwBaseball.Nodes.Add "Cubs", tvwChild, "Casey", "Casey", "Player"
tvwBaseball.Nodes.Add "Cubs", tvwChild, "Zack", "Zack", "Player"


tvwBaseball.Nodes("Cubs").Sorted = True
End Sub

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

926 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