This is a migrated thread and some comments may be shown as answers.

Treeview : Resize the node image.

1 Answer 1009 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Eusebio
Top achievements
Rank 1
Veteran
Eusebio asked on 22 Sep 2020, 10:03 AM

Is it possible to resize the image of the Treeview node ?.

I have a 16px x 16px size icon, but I want it to look smaller than it does by default.
I add each node by programmatically.

 

 

Thank you

Best regards

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Sep 2020, 10:53 AM

Hello, Eusebio,     

You can specify an icon for each RadTreeNode by settings its Image property. If your image is 16x16 but you want to display it smaller, you can simply create a new image with the desired size using the existing image: 
            RadTreeNode node = new RadTreeNode("Node 1");
            node.Image = new Bitmap(Properties.Resources.crayon, new Size(8,8));
            this.radTreeView1.Nodes.Add(node);

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Treeview
Asked by
Eusebio
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or