Unplanned
Last Updated: 30 Mar 2016 13:39 by ADMIN
ADMIN
Ralitsa
Created on: 25 May 2015 10:27
Category: TreeView
Type: Bug Report
0
FIX. RadTreeView - resizing the tree view change the spacing between characters of node`s text
To reproduce: 
1. Drag and drop RadTreeView on the form. 
2. Set the Dock property to true
3. Add 3 or more nodes with long names 
4. Resize the form to minimum size and you will notice that the spacing between characters is changed. 

Workaround: 
If FontSize of nodes is bigger than 13, you can subscribe to the NodeFormatting event and set the AutoEllipsis property to false: 
Font font = new Font("Segoe UI", 13f, FontStyle.Regular);
void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
{
    e.NodeElement.ContentElement.Font = font;
    e.NodeElement.ContentElement.AutoEllipsis = false;
}

If font size is smaller, you need to set the MinSize property too: 
Font font = new Font("Segoe UI", 12f, FontStyle.Regular);
void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
{
    e.NodeElement.ContentElement.Font = font;     
    e.NodeElement.ContentElement.MinSize = new System.Drawing.Size(500, 18);
}
Attached Files:
0 comments