The attached project demonstrates how to have a Treeview control display "open folder" and "closed folder" icons.
The attached project demonstrates how to have a Treeview control display "open folder" and "closed folder" icons.
Do not worry about your difficulties in Mathematics. I can assure you mine are still greater.Tips, Examples & Tutorials:
Albert Einstein
A valuable forum tool Generate unique TreeView keys TreeView with "open" and "closed folder" icons Time code using GetTickCount How to trap the Tab key Scroll a form NumberBox ActiveX control Color a ListView row An InputBox form How to use SaveSetting and GetSetting A program registration scheme Spellcheck a Textbox Resize controls Open Windows Explorer at Last Visited Path A Blackjack Game Count lines of code Private Message Viewer Copy/Paste VB Code Paste VB Code Add-In Insert Procedure Names Add-In A calculator for the game of Spider My review of REALbasic 2008 VB6 Debug Tutorial Picture/Video Viewer VBF Photo Contest Winners
2009 - 2013
can you explain how can i put code that lets say once you click on the "another" folder a msgbox popsup
Hi there fella,
here's how I done it.... Open the Treeview Zip attachment that was posted at the top of this thread by MartinLiss, and open the project.
Then add the code below to the bottom of the treeview form source code.
It checks each node that is double clicked to see if the text for that node is "another". If the text matches, then it throws up the message box at you.
VB Code:
Private Sub JUMP() MsgBox "You selected the " & Chr(34) & "another" & Chr(34) & " folder", vbInformation, "Another Selection" 'Popup a message box. End Sub Private Sub tvwDemo_DblClick() If tvwDemo.SelectedItem.Text = "another" Then JUMP 'Call the JUMP Sub, containing the message box. End If End Sub
There are other ways of doing it ... with indexes and stuff... but I found this to be the easiest method.
Hope it's of some help to you.