LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change the default font on the Front Panel only?

I want to change the default font for the Front Panel (labels AND control values) to be a bit larger. This is because our operators like larger fonts for the better readability.

I have used the LabVIEW options (tools menu, options, fonts) to set the application font to 18pt and then I checked the 'Panel default' checkbox and pressed ok.

However, when I restart LabVIEW and place a control on the panel, the label on the diagram also has the larger font.

My solution was to open the font options again and choose font style, pick 13pt again, check 'Diagram default' and then click ok here, and cancel in the dialog above (to avoid changing the application font).

When I restart LabVIEW new cont
rols placed will correctly have the larger label and control font on the panel, and the smaller font as label.

However, when I load previously created VI's, their labels are increased in size on the block diagram, messing up the layout there and taking too much space.

Does anyone here know how to set the fonts properly, so that I have the larger font on the panel, and the smaller on the block diagram? It should both apply to previously created VI's, and newly created VI's.
0 Kudos
Message 1 of 5
(9,304 Views)
Hello,

Unfortunately there is no *easy* way to automatically assign a new font size to previously-created VIs...the options in the font settings in the LabVIEW toolbar apply to all newly-created controls and indicators. I found a way to programmatically change the font size of controls in a previously-created VI, but it takes a bit of programming, and it actually has a problem. You can use VI Server to open a VI reference to the VI you wish to modify, then you can obtain an array of references to all the controls on that front panel...once you've done this, you can use a For Loop to change the font size (one by one) of each of the labels. I have attached two VIs that demonstrate how to do this...detach both to your desktop, open the front panel of both, the
n run the "changesize" VI and watch the font size of the labels of all the objects on the "test1" VI change.

One problem with this method is that it does not appear to work for controls that you have "copied"...it only works on controls that you drop directly from the palette...I am informing R&D about this bug so that hopefully they can fix it in a future version of LabVIEW.

I hope these examples help you out. Please let me know if you need anything else, and have a nice day.

Sincerely,
Darren N.
NI Applications Engineer
Download All
0 Kudos
Message 2 of 5
(9,304 Views)
Darren, thanks for your help so far. This wasn't exactly what I was looking for (yet), but it would probably have been a next step. The VI's will be very useful to make sure all VI's will have the same user interface properties.

My original problem was with creating new VI's. With the default font settings I managed to set I got:

(application font larger, with 'Panel default' checked): large fonts on the block diagram of existing VI's (which is irritating because as a programmer I like to have enough space available)

(application font set to the default one, but 'panel default' set to the larger font): I had the correct size for labels on the Front Panel, but the controls themselves would have the smaller font (which is still not good enough for the operat
ors).

I am specifically looking for a way to make labels AND controls on the front panel visible with a large font, and 'everything else' small font.
0 Kudos
Message 3 of 5
(9,304 Views)
Hello,

I think I see what's going on...when you say you want the larger font on "controls", I assume you mean things like knobs and sliders, which have fonts "within" them (their scales, e.g.). Unfortunately, I know of no way to cause those front panel items to have a larger font within them whenever you drop them from the controls palette. However, I do have a workaround...you could design your own custom controls of those items, then save them as individual .ctl files. You could then add those .ctl files into your controls palette, and start using the custom controls when you design your front panel. This is the best way I can think of for your particular situation.

I hope these suggestions help you out. Please let me know if you need any ot
her assistance, and have a pleasant day.

Sincerely,
Darren N.
NI Applications Engineer
0 Kudos
Message 4 of 5
(9,304 Views)
Pity there isn't an easy way (perhaps something to address in a next version of LV), but I guess your alternative to create the custom controls isn't so bad as it's a 'write once, use many' solution 🙂

Thanks!
0 Kudos
Message 5 of 5
(9,304 Views)