LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically change Font of Array Index

It's really just a control that you make yourself for specific functionality. It has its own logic and memory that it stores in the background to handle value changes, etc. You can also create your own properties and methods. XControls are the alternative to having you main application handle events for the controls and are usually used to combine a few controls/indicators in to one.

 

For your use, you could create an XControl with an array and numeric control on its front panel. Upon value change of the numeric control (event structure in the XControl's Facade VI), you would change the index of the array. Simple.

Here's more info.

 

I've used XControls to do anything from index arrays to make sure two sliders couldnt pass each other on a two-input slider control.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 11 of 25
(2,281 Views)

I know it doesnt answer your answer exactly, but I was very surprised to learn that, it might help you to find a different approach to solve your problem.

 

http://digital.ni.com/public.nsf/allkb/64DCAB86E5E0D83886256E5F005E9B96

 

0 Kudos
Message 12 of 25
(2,266 Views)

I guess another work around is just manually set the Font Size.  That should at least transfer from one OS to another, yes?

0 Kudos
Message 13 of 25
(2,236 Views)

This is very kludgy, but it's the only thing I can think of.

Run the VI, then click in the array index numeric text, and it will change to the specified font.

It works by monitoring the object with text focus.  The index text is the only text object that belongs to the array, but isn't an array element.

Of course the big down side to this is you have to get the user to click on the index display before you can get a reference to it.

"If you weren't supposed to push it, it wouldn't be a button."
Message 14 of 25
(2,199 Views)

Now we can force the focus on the array element and then simulate a "Shift+Tab" Keystroke. It will set the focus to the array index.

 

Force Focus on Array Index.png

Message 15 of 25
(2,181 Views)

Generalizing it we get the attached VI.

BUT it only works with Windows, and only if the front panel is open.

"If you weren't supposed to push it, it wouldn't be a button."
Message 16 of 25
(2,152 Views)

I don't have LabVIEW 2014.  I am running 2011.  But I get the feeling that this may not work with Remote Panel.

0 Kudos
Message 17 of 25
(2,140 Views)

Here it is for LV2011

"If you weren't supposed to push it, it wouldn't be a button."
Message 18 of 25
(2,119 Views)

The bad thing is that the reference gets closed when the Keyfocus change. We have to call the VI each time we need the reference.

0 Kudos
Message 19 of 25
(2,101 Views)

I'm pretty sure you were seeing a different bug (not the reference closing).  Try this.

"If you weren't supposed to push it, it wouldn't be a button."
Message 20 of 25
(2,082 Views)