Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Treeview > How to create Custom Node Element in TreeView?

Not answered How to create Custom Node Element in TreeView?

Feed from this thread
  • Myat Su avatar

    Posted on Nov 17, 2011 (permalink)

    Hello,
    I want to show large image in tree node and create border for node.
    So I think, I need to create treeview custom node, am I right?
    Please give me advice how to do, create custom node and do other things?

    Please help me,
    Thank you so much.
    Myat Su

    Reply

  • Stefan Stefan admin's avatar

    Posted on Nov 22, 2011 (permalink)

    Hello Myat Su,

    Thank you for writing.

    In order to show nodes with bigger images, simply set the desired image to Image property of the desired node and then set the AutoSizeItems property of the TreeViewElement to true, so the nodes will be sized according to their content.

    In order to show borders around the nodes, set the top and bottom border colors of the NodeElement in the NodeFormatting event handler.

    Attached you can find a sample project with the desired functionalities implemented. 

    Let me know if you have any other questions.

    Regards,
    Stefan
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Treeview > How to create Custom Node Element in TreeView?
Related resources for "How to create Custom Node Element in TreeView?"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]