Click here to Skip to main content
15,897,291 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I have a treeview that filling with data from database. In the runtime a few letters in the parent nodes are invisible but childs are correct. Example

+ First Par (This is: First Parent)
+ Second Pare (This is: Second Parent)
- Third Par (This is: Third Parent)
Third Parent - First Child
.
.
.

What I do?!!
Thanks

Edit:
my code:

DataTable dt = GetRecords(query);

//parent.Nodes.Clear();

foreach (DataRow dr in dt.Rows)
{
TreeNode tn = new TreeNode();

tn.Name = dr["groups"].ToString();

tn.Text = dr["text"].ToString();

tn.ForeColor = Color.Green;
tn.NodeFont = new Font("Times New Roman", 11, FontStyle.Regular);

treeview1.Nodes.Add(tn);

}

i found that problem is in the font changing, when this line is commented displaying is ok.
this problem only in parents was detected and if i using this code for fetching childs nodes, no problem detected (with font changing).

in the disign i set the treeview1 font on "Times New Roman" size 10, if help!
Posted
Updated 7-Sep-14 19:47pm
v5
Comments
Sergey Alexandrovich Kryukov 7-Sep-14 21:52pm    
To start with, you did not even tell us what TreeView class did you mean. Full type name, please. Don't think there is only one.
Now, you screwed up something. But how can we know how did you do it?
—SA

1 solution

this could be for limited width issued to treeview control.
 
Share this answer
 
Comments
maysamfth 8-Sep-14 1:40am    
the post was updated

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900