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: 

Changing Application Font sizes of Exe using ini file

Hello All,

 

I have built a LabVIEW Executable which runs fine. I have two tab controls with three pages each. I have used application font for Tab headings but with different sizes (15pt Application Font for one tab and 12pt Application font for the other tab). I have an ini file which comes along with the Exe. I tried changing the application font size in the ini file by adding the statement (appFont="0"18) into the file. Only the 15pt Application font size changes and the other one remains unchanged. I am sure that both are application fonts with different font sizes. Are there any solutions? Thanks in advance.

0 Kudos
Message 1 of 11
(5,202 Views)

Try these in your application.ini in the [application] section

appFont="Tahoma" 13
dialogFont="Tahoma" 13
systemFont="Tahoma" 13

Send kudo and solution if it solve your situation.

Benoit

Message 2 of 11
(5,183 Views)

[my app]

systemFont="Segoe UI" 15
dialogFont="Segoe UI" 15
appFont="Segoe UI" 15
FPFont="Segoe UI" 15

 

(not trying to steal your solution or kudo!)

Message 3 of 11
(5,177 Views)

When I keep the font size of all the page labels to be 15pt, this works. But when one is 12pt and the other is 15pt, it does not work. Only the 15pt application font changes size. So, if the application fonts are of different sizes, only the font with the higher size can be modified through the config file coming along with the Exe. Is this the Conclusion?

0 Kudos
Message 4 of 11
(5,153 Views)

@PrasannaSSRK wrote:

Is this the Conclusion?


Think so.

 

Well, you can (recursively) change all the fonts with VI server. So get all controls, get all (visible) font references and change them. Also do this for all controls in clusters and tab control pages.

 

If this is going to work well, depends a bit on the application and your skills. Changing some font sizes might have side effects that also need to be handled. For instance increasing the font size of cluster elements might not automatically resize the cluster and reposition the controls. That's not what you asked for, but it seems relevant to mention.

 

0 Kudos
Message 5 of 11
(5,145 Views)

If you look at the first post, you will notice that he has tab control with pages. It is impossible to change the page font unless changing the application font. Which is the initial problem. VI server can,t solve this since it is impossible to change application font by VI server and only at run-time. National Instrument fail for the explained feature of building application. They should allow us to create a parametric .ini file for any application.

 

Benoit

0 Kudos
Message 6 of 11
(5,125 Views)

There are definitely limits to what you can do. If you think LV needs that functionality, you can post it as idea on the idea exchange.

 

If you want a solution you need to find a pragmatic solution (aka workaround).

 

How many different font sizes do you need? There are 4 defined in the ini file. If you have 4 different sizes, instead of using for instance application font with different sizes, use one of the 4 fonts to define the size. Then the ini file can be used to change the sizes of all different sized fonts. Not ideal, but perhaps a workaround.

 

Of course you can mix. For instance, recurse over all controls to set the font, and use a standard font with ini file defined size for page labels.

0 Kudos
Message 7 of 11
(5,118 Views)

Wait let me laugh... 

NI reading to the idea exchange... hahahah!!!

This issue of tab control that cannot change font is there since sooooooo long time ago... It's like the .net issue that is there since labview2014

Sorry... I have a lot of issue with things like this in LabVIEW. Doing multiple language application that can change on the fly is basically impossible because of the control like tab control that has no property on the text font name and size. the only solution is workaround... well... NI is losing so much market shares because of language like python offers great feature with less issues... NI like to develop new stuff but not look at what they are breaking in their evolution.

Benoit 

Message 8 of 11
(5,116 Views)

Not disagreeing...

 

That's where NXG comes in.

 

Changing language doesn't seem to be a problem for lots of other people (incl. me) though. The text can be changed, the font or font size doesn't need to be changed to be multi language. Of course MCSB is a pain, but again, that's what NXG should solve.

0 Kudos
Message 9 of 11
(5,111 Views)

NXG is way to high level. it removes every low level functionality that we can have. NXG is made for people that just want to do a quick soft to measure some stuff.

In my case, NXG is not a solution... if this is the future of LabVIEW, I<ll move away from it.

Benoit

0 Kudos
Message 10 of 11
(5,108 Views)