
Color of Nodes in a treeview
David, I guess it all depends on what version of MS Common Controls you
have.
If you have VB6 (MS Common Controls Version 6.0) you can try:
Dim i As Integer
Dim nod_x As Node
For i = 1 To 25
Set nod_x = TreeView1.Nodes.Add(, , , "This is a sample node: " & i)
nod_x.ForeColor = QBColor(Int((15 * Rnd) + 1)) ' Generate random value
between 1 and 15.
Next
If you have MS Common Controls 5.0 (SP2):
Check out the following link:
VBNet:
Code Library | Common Ctrls | TreeView | Applying Special Effects to a
Treeview via API
http://www.mvps.org/vbnet/
hth
galen
Quote:
>How do I change the color of an individual Node in a treeview?