LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
TomBrass

Set Font on Dialog Box

Status: New

The built in dialog boxes (such as one button dialog) in LabVIEW are set to the 13pt dialog font.  It would be very handy to be able to set the font size, bold, color, etc. for a dialog box.  Some of my applications need a pop-up that is easier to read, so I have to make a custom dialog box in order to change the font size.

Tom Brass
Certified LabVIEW Architect
Saint Bernard Engineering, Inc.
www.saintbernardengineering.com
6 Comments
tst
Knight of NI Knight of NI
Knight of NI

I'm assuming these use the standard OS dialogs. Presumably, changing the display settings in the OS will change this, but it will change it globally.


___________________
Try to take over the world!
AristosQueue (NI)
NI Employee (retired)

Tst is correct. These are system dialog boxes, and they will always conform to your operating system specs.

 

The three button dialog box is a VI which you are free to copy and customize to your needs. Passing empty strings for the button names will cause the buttons to disappear, so you can easily use it as a one or two button dialog. In general, using a non-system font for a dialog display is discouraged since the font to display might be a unicode or multibyte font displaying special characters, and you specifying an explicit font will mess up the user's ability to see/read the text.

TomBrass
Member

The specific font really isn't an issue, since I always use standard fonts, just not the standard font size.  Changing the font size and boldness are the things I really want.  Of course, I can create my own, which I do, and copying the three button dialog box is a good idea.  It just seems like a bit of a hassle, especially when you are trying to meet a deadline.  Just looking for a little time saver.

Tom Brass
Certified LabVIEW Architect
Saint Bernard Engineering, Inc.
www.saintbernardengineering.com
AristosQueue (NI)
NI Employee (retired)

Font size is probably the most important thing not to futz with... If someone has bad eyesight, they may have pumped up their font size, and you setting something smaller would be a disservice. As for bold, you probably don't want to boldface the entire text, just certain key words. Check out the General Error Handler code -- it has code in there (look for a call to "Format Message String.vi") for detecting the <b> and </b> tags and setting a string control to be bolded in just the right places (someone may have built an XControl somewhere that does this sort of parsing automatically).

 

I don't think we want to load down the basic dialogs with code for HTML parsing, especially since such dialogs may be dispalying error information that might have angle brackets or other characters in the text. I could see the value in adding another VI to the palette for "Formatted String Dialog" that does do HTML-lite parsing of its input string.

 

Thoughts?

TomBrass
Member

I fine leaving the standard dialog boxes alone.  Having a separate VI would be just fine.  Using the HTML parsing makes it pretty straight forward, and consistent with other aspects of LabVIEW (such as the VI Descriptions).

Tom Brass
Certified LabVIEW Architect
Saint Bernard Engineering, Inc.
www.saintbernardengineering.com
shb
Active Participant
Active Participant

There is the setting for "Dialog font" (dialogFont in LabVIEW.ini). This modifies the dialog font in VIs. Maybe also in the one button dialog.