andreas_rafn
asked on
How to avoid part of node text not being visible in TreeView control in VB.NET (see picture)?
I'm experiencing a weird visual behavior of Windows.Forms.TreeView controls that I haven't managed to avoid yet. Some of the text of root nodes are not showing. I have attached a screendump to show what I'm experiencing.
TreeViewAbnormality.PNG
TreeViewAbnormality.PNG
ASKER
Haven't overwritten the Paint event, and couldn't reproduce the problem in a new project.
However I tried to change fonts back to defaults and that solved the problem. It is kind of annoying though, that one has to use stanmdard fonts for the TreeView to behave properly.
However I tried to change fonts back to defaults and that solved the problem. It is kind of annoying though, that one has to use stanmdard fonts for the TreeView to behave properly.
ASKER
Intuitively it seems that the size of the root node is set to the size that would have been appropriate for a node with the default font (Microsoft Sans Serif, 8 pt, Regular). Is there any way to make sure the size of nodes follows the size/style of the chosen font??
Do you change font at runtime? I think changing it works at design time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I ended up simply using the default font for the TreeView control, as it, regretfully, seems to be the only one working properly.
can you reproduce this behavior in another project in which the treeview would have all the default values?