[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Change font of Node

Posted on 2009-02-12
Medium Priority
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

Munawar Hussain earned 1500 total points
ID: 23629720

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
ID: 23630737
if your text is Test

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

Expert Comment

ID: 23631215
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

873 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