Change font of Node

Posted on 2009-02-12
Last Modified: 2012-05-06
Hi experts,
i need change font only 1 node dinamic generated on my TreeView component in ASP.NET using VB.NET.

Please help me.
Question by:fsouzabrasil
    LVL 12

    Accepted Solution


    The styling is available for specific nodes/template

    like you may do that like

    TreeView1.HoverNodeStyle.BackColor =Drawing.Color.Red

    other can be for each level
    default node style
    for selected node
    for parent node
    leafnode style
    child node ..

    and as per you criteria you may use any of them

    LVL 15

    Expert Comment

    by:Praveen Venu
    if your text is Test

    then change it to <font color="red">Test</font>
    LVL 83

    Expert Comment

    Its very easy for windows applications as shown below.
            Dim n As New TreeNode
            n.NodeFont = Me.Font

    There is no direct way of doing this in ASP.NET.
    You can change the selectednodestyle and make the node selected programmatically to apply that style on it. To select a node:

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now