NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Trusted Enthusiast
Darren
Posts: 2,614

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.

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Trusted Enthusiast
Darin.K
Posts: 3,353

Re: Darren's Weekly Nugget 02/01/2010

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?
Trusted Enthusiast
Darren
Posts: 2,614
0 Kudos

Re: Darren's Weekly Nugget 02/01/2010

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.

 

 

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Trusted Enthusiast
Darin.K
Posts: 3,353
0 Kudos

Re: Darren's Weekly Nugget 02/01/2010

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.

Trusted Enthusiast
Darren
Posts: 2,614

Re: Darren's Weekly Nugget 02/01/2010

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.

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Member
K1200LT_rider
Posts: 95
0 Kudos

Re: Darren's Weekly Nugget 02/01/2010

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.
Active Participant
craigc
Posts: 363
0 Kudos

Re: Darren's Weekly Nugget 02/01/2010

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 2009 .

DTA
Active Participant
Hooovahh
Posts: 231

Re: Darren's Weekly Nugget 02/01/2010

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.

Trusted Enthusiast
TCPlomp
Posts: 3,085
0 Kudos

Re: Darren's Weekly Nugget 02/01/2010

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!
Trusted Enthusiast
DFGray
Posts: 2,566
0 Kudos

Re: Darren's Weekly Nugget 02/01/2010

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.
Using LabVIEW 2009 - 2012 on Windows 7 64-bit
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page