|
-
Feb 18th, 2006, 03:05 AM
#1
Thread Starter
Member
create a tree view[resolved]
Actually this is how i want
Zones
-Zone1
--- Room1
-- Room2
-Zone2
-- Room1
--Room2
Thanks
Sai Abhiram Bandhakavi
Last edited by sai_abhiram; Feb 18th, 2006 at 03:22 AM.
Reason: Resolved
-
Feb 18th, 2006, 03:15 AM
#2
Re: create a tree view
VB Code:
Option Explicit
Private Sub Form_Load()
TreeView1.LineStyle = tvwRootLines
TreeView1.Sorted = False
TreeView1.Style = tvwTreelinesPlusMinusText
TreeView1.Nodes.Add , , "Main", "Zones"
TreeView1.Nodes.Add "Main", tvwChild, "Zone1", "Zone1"
TreeView1.Nodes.Add "Zone1", tvwChild, "Z1Room1", "Room1"
TreeView1.Nodes.Add "Zone1", tvwChild, "Z1Room2", "Room2"
TreeView1.Nodes.Add "Main", tvwChild, "Zone2", "Zone2"
TreeView1.Nodes.Add "Zone2", tvwChild, "Z2Room1", "Room1"
TreeView1.Nodes.Add "Zone2", tvwChild, "Z2Room2", "Room2"
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 18th, 2006, 03:25 AM
#3
Thread Starter
Member
Re: create a tree view[resolved]
thanks man , its workin really the way i wanted it to be.
-
Feb 18th, 2006, 05:47 AM
#4
Member
Re: create a tree view[resolved]
i want to show the result as shown below. i want to access the data from database instead of hardcoding.
LocationName
-----------------SuiteName1
----------------------------------Floor1
-------------------------------------------Room 101
-------------------------------------------Room 102
-------------------------------------------Room 10n
----------------------------------Floor2
-------------------------------------------Room 201
-------------------------------------------Room 202
-------------------------------------------Room 20n
----------------------------------Floorn
-------------------------------------------Room 101
-------------------------------------------Room 102
-------------------------------------------Room 10n
-----------------SuiteName2
----------------------------------Floor1
----------------------------------Floor2
----------------------------------Floor3
----------------------------------Floorn
-----------------SuiteNamen
----------------------------------Floor1
----------------------------------Floor2
----------------------------------Floor3
----------------------------------Floorn
hope u understood. Pl help me
Regards
Hiran
-
Feb 18th, 2006, 12:49 PM
#5
Re: create a tree view[resolved]
hiran3727:
Check out my response (#2 of this thread) :
http://www.vbforums.com/showthread.php?t=387898
I posted an attachment that contains several Treeview examples which you may find helpful.
"It's cold gin time again ..."
Check out my website here.
-
Feb 19th, 2006, 06:15 AM
#6
Member
Re: create a tree view[resolved]
hi,
i have vb6 in my system. I am not finding MS common controls 6.0 to get the tree view component. pl suggest
hiran
-
Feb 19th, 2006, 01:19 PM
#7
Re: create a tree view[resolved]
Project > Components > Controls tab > select "Windows Common Controls 6.0" click OK.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 22nd, 2006, 12:02 AM
#8
Member
Re: create a tree view[resolved]
hi,
i have used the code which was mentioned in #2. Its working fine. But according to my requirement it is different.
Ex:
Location
Suite
Floor
Room
Under one Location, there will be n number of Suites and under one Suite there will n number of Floor and under one floor there will be n number of rooms.
Once i select Location from the combo box, i want to display its suites, floors and rooms under each child node.
Pl help
regards
Hiran
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
|