Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Changing Font, Font Size, FontBold, FontItalic, and ForeColor of Nodes on the Tree Contol in VB6

Posted on 1999-10-08
Medium Priority
Last Modified: 2013-12-03
Hi All,  
 I would like to change the text of a Node in a Tree Control depending on whether or not it has children.  Basically,  how do I change the Font, Font Size, FontBold, FontItalic, and ForeColor of Nodes on the Tree Contol in VB6 without making a change to the entire Tree Control?

 No third party controls allowed please.

Question by:DoughBoy
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Author Comment

ID: 2111171
Edited text of question.
LVL 10

Expert Comment

ID: 2111258
"No third party controls allowed please"

In that case I don't think you're going to get what you want.
LVL 14

Accepted Solution

mcrider earned 1000 total points
ID: 2111411
TreeView1.Nodes(index).Children 'Gives you the number of children in the node "index"

However, the font properties are only associated with Treeview and not nodes... Therefore changing fonts on a node using the standard Treeview object is not possible.

Sorry, but not without a custom control!

Industry Leaders: 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!

LVL 32

Expert Comment

ID: 2111444
Is there an echo in here?

Author Comment

ID: 2113592
I guess I will have to give you the points. You answered correctly.
Thanks for your help anyway.

Expert Comment

ID: 6854002
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

For experts interesting in helping the cleanup effort in their respective TAs, this link please:
Thank you,
Moderator @ Experts Exchange

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

705 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