LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bolding text in trees, etc.

Is there a way to programatically enter bold text into a tree structure? I would like to be able to programatically create a tree where all the parents are bold and all children are plain. It would also be nice to specify different colors for the text. Is this possible?

Also, is there a table of the "\" codes anywhere? I would like to know what all the "\" codes can be used for other than the usual space, tab, etc (or is this all they can be used for).
0 Kudos
Message 1 of 3
(3,069 Views)
Hi Derrell,

There is no way to programmatically enter bold text in a tree structure at this time. The best that can be done is to programmatically load a custom symbol in the tree control. This custom symbol can simply be the name of the parent in bold. This might be overkill for what you're looking for, but take a look at the example program I've attached to this post.

The example shows how to traverse (navigate through) a tree and how to use custom symbols for each item in the tree. I've essentially created a tree control of similar to what the NI Measurement & Automation software displays in its configuration pane. To the left of each tree control tag is the corresponding icon that is displayed.

Text colors (background and foreground)
are also set through a Property Node for the Tree. Select ActiveItemTag for the property, expand the node, and then select the property ActiveCellProperties->Foreground Color or Background Color to set the text colors. Wire in a colorbox as the constant control to these properties. I've shown this in the Assign Symbols to Tree Items subVI in the attached program.

See VI block diagram comments for implementation details.

Note: When opening the example, be sure to unzip all files to a location on your hard disk before opening the LLB. If you attempt to open the LLB from within the ZIP file, the images used for the custom item symbols will not be found.


To answer your question regarding the "\" escape characters, refer to this KnowledgeBase article: What Are the Valid C Escape Sequences?


Hope this helps!

Kileen Cheng
Applications Engineer
National Instruments
Message 2 of 3
(3,069 Views)
Thanks Kileen.

Derrell
0 Kudos
Message 3 of 3
(3,069 Views)