LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GUI Font Features

In the following Screen Capture, I am having a difficult time finding the property that depicts the Indicator's Font Features (Name, Size, etc).  Am I not looking in the right place or is this a shortcoming of LabVIEW 2011?  By the way, I'm using LabVIEW 2011.

Capture.JPG 

0 Kudos
Message 1 of 17
(4,401 Views)

It looks like you are trying to look at the wrong level of the objects.  You are looking at the collections (arrays) of objects that make up the panel.  You need to index out a particulare object, then perhaps typecast that to a more specific object type in order to see properties such as font adn other settings.

0 Kudos
Message 2 of 17
(4,385 Views)

Since different types of controls have a variety of texts, the text properties are not in a generic control type.

For a string indicator, a property is Text-> Font -> ...

For a numeric indicator, there is Numeric Text -> Font -> ...

For a boolean indicator, there is Boolean Text -> Font -> ...

As you can see here, a slider has many components that have fonts:

SliderFonts.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 3 of 17
(4,377 Views)

Hmmm... I can see that being a problem then.  So what you're saying, there's really no way to be able to make a program that just goes through all the unknown Indicators and reports on their settings?  You know, just drop a subVI, give it the Top Level VI reference and then let it do its thing?

0 Kudos
Message 4 of 17
(4,367 Views)

@DailyDose wrote:

Hmmm... I can see that being a problem then.  So what you're saying, there's really no way to be able to make a program that just goes through all the unknown Indicators and reports on their settings?  You know, just drop a subVI, give it the Top Level VI reference and then let it do its thing?


I'm not saying that.  I don't know whether you can or can't.

 

You don't necessarily have to typecast a control reference down to its most specific class.  A more generic level of the class might contain a property node if it is common all of the more specific classes below it.  Font might be one of those things.

 

I think the first question to ask is what are you really trying to do here?   A better answer might be possible knowing the answer to that question.

0 Kudos
Message 5 of 17
(4,351 Views)

I have GUI that has about 50 different Indicators.  Clusters, Arrays, Numerics, Strings, etc.  Going from OS to the other is causing Font Issues since the default is OS Default.  So, I want to get all the settings from Win XP (where it was originally programmed) and apply them to my Win 7 and leave that VI in the app be so that whenever anyone opens GUI, there are no more Font issues.  Big words, too small words, stuff overlapping each other.  All that jazz.

0 Kudos
Message 6 of 17
(4,347 Views)

You can add lines to  your LabVIEW.ini or the particular application's.ini if you built it into an executable so that instead of using the OS's definition of the font, you can set it to wha you need it to be including the definitions of thes OS it was originally written in.

 

See:

http://forums.ni.com/t5/LabVIEW/Preventing-Controls-and-Text-From-Resizing-With-OS-Font-Settings/m-p...

Message 7 of 17
(4,335 Views)

Well, it doesn't necessarily answer the question, but it certainly solves the problem.  Thank you good Sir!

0 Kudos
Message 8 of 17
(4,276 Views)

@DailyDose wrote:

So what you're saying, there's really no way to be able to make a program that just goes through all the unknown Indicators and reports on their settings?  You know, just drop a subVI, give it the Top Level VI reference and then let it do its thing?


Yes and no. You can write this, but you will need to find the class of each reference, cast it down to the specific class and then call the relevant properties from that class and format them in a way that would work for you. That means you have to write explicit code for each class of control you support.

 

There's an old tool called Property Saver (http://www.kshif.com/lv/index.html) which does this and might look at the fonts, but it's probably easier to either set the font in the INI file or to select all the objects in the FP and change their fonts at once to a static font and then go and fix it. Of course, that second one does require doing it for all visible VIs.


___________________
Try to take over the world!
0 Kudos
Message 9 of 17
(4,190 Views)

Here is some old code that does somthing similar: It sets the size of a front panel G Object.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 10 of 17
(4,110 Views)