LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change array index font size using VI scripting

Hello All,

                     I have a array control in my front panel, I'm wondering is there any way to change that "array index" font size using VI scripting?

Example:

1. I have this array

Array Normal.JPG

2. Manually I have changed the font size of the array in "Selection Font" panel as below

Array Modified.JPG

3. Through VI scripting I'm able to control control font size, label font size.,.. But not the index font size. So it looks odd.

Array I can do.JPG

4. I'm expecting to be modify this array as same as picture 1 through VI scripting.

 

Note: It may not have any practical application, but some time it will be helpful for the programmers to make a quick drop. If anybody have any idea, please share.

 

<Electro Sam>

0 Kudos
Message 1 of 8
(3,641 Views)

It looks like the index is chaging font size.  It's the ELEMENT that is not changing

.  

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
0 Kudos
Message 2 of 8
(3,604 Views)

You need to cast the reference to the array element to a digital numeric class.  Wire that  reference to a property node and you'll be able to see the Numeric Text.Font:Size property.  That's what you want.

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
0 Kudos
Message 3 of 8
(3,600 Views)

I think he is saying he wants to be able to change the font of the index.  That he has been able to change the label and the element.

 

(Kind of confusing, but the way I read the steps, he manually went and made everything bigger, then tried to programmatically set everything back to a normal font, but only found it for the label and the element.)

 

I don't think you can do this.  I don't think the font for the index is exposed through scripting.

0 Kudos
Message 4 of 8
(3,586 Views)
  1. Raven - you are right, Actually I'm looking for options to change the font size of the array index.
  2. Actually we have coding standard to follow. In that, all the front panel controls needs to be in Font size 14 and the size should be 25X120, so I'm trying to write a code which automatically converts the VI FP control sizes to be in standard size.
  3. I'm not only using one customer VI, I'm handling various customer VIs, so each one VI FP control sizes are different. So I'm developing this utility to standardize the VI's as per the guidelines we have.
  4. Except this array index most of the VI FP control elements I have handled, Only this array is troubling me.

Appreciate your support guys, please share your thoughts.

<ElectroSam>

 

0 Kudos
Message 5 of 8
(3,571 Views)
I'd use strict type definitions in this case to both enforce your current style choices and facilitate changing your mind later.
0 Kudos
Message 6 of 8
(3,564 Views)

 

There's no good way to do it with scripting.

It is possible to get a reference to the object with key focus, and from there you can get to the text attributes.  But putting text focus on the index isn't easy.  You could pop up a dialog and ask the user to click on it, or you could try simulating moust events,

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 8
(3,540 Views)

Yep.  I misread the original post.  It looks like there is no way to change the index font size.

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
Message 8 of 8
(3,537 Views)