From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 02/01/2010

It can sometimes be difficult to deal with the formatting of strings on the front panels of user interface VIs.  One problem in particular I've often had is bolding certain text in user-visible strings.  One handy solution is to use [LabVIEW]\vi.lib\utility\error.llb\Bold Particular String.vi in the following manner:

 

bold_particular_string.png

 

As you can see, any string contained in <b></b> tags will become bolded in the display string.  This solution is much easier than having to find the correct character indices yourself.

Message 1 of 12
(7,352 Views)
Is this an official recommendation to use a VI in vi.lib that is not in the palettes?  Should we beware that this may become private at some point and maintain a personal copy?  Or, will this one be "promoted" now that the cat is out of the bag?
Message 2 of 12
(7,244 Views)

I've written other nuggets over the years that promote VIs that aren't in the palettes, like this one and this one.  Instead of repeating here my feelings on the utilization of non-palette VIs in vi.lib, I'll instead direct you to read my response in this thread.

 

 

0 Kudos
Message 3 of 12
(7,211 Views)

That response (and thread) is actually the source of my question, not the answer, and I believe your other nuggets predate that post (or at least my reading of it).  My question was simply, in light of the issue, is it still reasonable to use the non-pallete VIs directly, or should we get into the habit of making and using personal copies?  They seem to be on somebody's radar screen now, which may not have always been the case.  I was hoping that I could read into your continued endorsement that no major surprises are lurking.

0 Kudos
Message 4 of 12
(7,150 Views)

My personal feeling is that you should use the vi.lib VIs as they are, under the looking-forward and looking-backward assumptions I made in the aforementioned thread.

Message 5 of 12
(7,146 Views)
Maybe someone could take this idea a step further and put together a VI that will parse out all the available font attributes (bold, underline, italic, strikeout, etc.).  I think that would be an excellent addition to the OpenG String category of VIs so everyone would have universal access to it.
0 Kudos
Message 6 of 12
(7,031 Views)

Thanks Darren,

 

Have also thought about doing something similar but in reverse for linking out of string indicator.  i.e put "refer to the error document for details"in a string indicator which would allow the user to fire off an event which would ultimately take them to some documentation or website even.  Might be able to do a similar thing from this.

 

Craig

LabVIEW 2012
0 Kudos
Message 7 of 12
(6,975 Views)

I found this which does what you said (saved in 8.5).  Unfortunatly I can't find where it was originally posted (I believe it to be in these forums somewhere) but I don't have the name of the original uploader, or even the name of the original archive.  The example works, but one thing is it is picky about having <B> instead of <b> and <SIZE> instead of <size>, which is easily fixable.

Message 8 of 12
(6,931 Views)

Funny, the VIs in the error tools are case ignorant (both <B> and <b> work), however when using the VI description, only <B> works.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 9 of 12
(6,909 Views)
You can use <b> and it will work in VI descriptions from at least LabVIEW 8.2 and up.  I know it does not work for 7.1 and I don't have 8.0 on my machine to test.
0 Kudos
Message 10 of 12
(6,848 Views)