Formatting Treeview control

  • Thread starter Thread starter Juan Romero
  • Start date Start date
J

Juan Romero

Hey guys,


I was wondering if anyone knows of a way to format the nodes in a treeview.
For instance, I would like to color or make bold the root Node.

Any ideas?

Thanks in advance!
 
Juan Romero said:
I was wondering if anyone knows of a way to format the nodes in a
treeview. For instance, I would like to color or make bold the root
Node.

Among others, a Treenode has the properties Nodefont, Backcolor, Forecolor.
 
* "Juan Romero said:
I was wondering if anyone knows of a way to format the nodes in a treeview.
For instance, I would like to color or make bold the root Node.

\\\
Dim t As TreeNode = ...
With t
.ForeColor = ...
.BackColor = ...
.NodeFont = New Font(...)
End With
///
 
Thanks guys, you were right. However, when I change the font size, the
displaying rectangle does not resize, and half the text is not seen. How can
I handle this?

Thanks.

P.S.: Regarding the NodeFont property:

I wonder why Microsoft does such a thing.....
I mean they want to standarize everything for inheritance, yet they call the
property "NodeFont" instead of just "Font".... although come to think of it,
the node probably inherits the font property by default, maybe that is
why....
 
Back
Top