Format Text in Treeview

seanhepburn2002

New member
Joined
Mar 5, 2006
Messages
3
Programming Experience
Beginner
Hi, After searching for an answer for days (and finally admitting it's beyond my ability:confused: ) I wonder if anyone could explain to me how to include 'text formatting' (i.e. BOLD, ITALIC etc.) to the code below that enables treeviews to be saved and loaded from an XML file ...

http://www.codeproject.com/vb/net/DragDropPersistingTreeV.asp

I have tried to alter the XML file, add code to include text format in the VB code but this normally ends in an exception to do with 'reflection'.

I have been tinkering with VB for about a year now and still feel as though I've only learned 10% of it...lol...so I would really appreciate any help you guys can give me.

cheers...sean
 
There is no formatting associated with the text of a treenode other than the font of the treeview control. What you can do, is to set the treeview.drawmode to ownerdrawtext and use your own criteria to draw certain nodes text with a different font. I guess you could save this info in each treenodes Tag property. (it will be included in serialization)

See the "TreeView.DrawNode Event" topic in help.
 
Back
Top