LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically change application font

Solved!
Go to solution

Is it possible to programmatically change the Application/System/Dialog fonts? (The UI method is: Tools > Options > Environment > Fonts.)

 

I am interested in doing this in the context of internationalizing an application: for English, Spanish, French, German I can use, for example, Verdana. But once I get to Chinese I run into the problem of having to set the font dynamically. Writing code to set the font of every UI element individually is unmaintainable, so I'm wondering if there's a way to set the Application, System, and Dialog fonts.

 

Thanks,

Mark Zvilius

0 Kudos
Message 1 of 4
(3,564 Views)

I couldn't find any application property nodes after doing a quick 2 minute search. Thinking about this a little more. Any changes made in the Tools>>Options dialog will only take effect the next time LabVIEW is launched. This is because those options are contained in the LabVIEW.ini configuration file and this is only read once (when LabVIEW is opened). I think you could probably read the LabVIEW.ini file, make the changes necessary to change the Font to what you want, and then programmatically restart LabVIEW but I want to preface this with messing with the LabVIEW.ini file can lead to bad juju. I will keep looking around but I don't see an easy way through this with a property node at the moment. We'll see what other options the community comes up with as well. Hope this helps!

0 Kudos
Message 2 of 4
(3,555 Views)
Solution
Accepted by topic author Mark Zvilius

To add to Grant's comments, see Broken Arrow's post here

 

Ian

Message 3 of 4
(3,540 Views)

Ian, specifying the font settings in the .ini file of the built application may be a good solution in this case. Thanks for the pointer.

 

Mark Z.


0 Kudos
Message 4 of 4
(3,518 Views)