From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

How can I programically change the background color of one VI using another VI?

Solved!
Go to solution
Is it possible to change the text background color of an indicator on the front panel of one VI from a different VI? 
0 Kudos
Message 1 of 6
(3,454 Views)
Solution
Accepted by Coutts

Hi There,

 

You can programmatically change the front panel code like this,

 

Can I Programmatically Change the Color of the Front Panel?

http://digital.ni.com/public.nsf/allkb/0DDBDB2FE2F54A5286256918006D7BB9?OpenDocument

 

Then by using VI Server, you can get a reference to VI on another machine to edit it (or on the same machine)


Hope this helps, 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 2 of 6
(3,452 Views)

I just gave it ago, works well 😄 examples in LV 8.6

 

picture.JPG

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Download All
0 Kudos
Message 3 of 6
(3,447 Views)

There does not seem to be an option for changing the color of numeric text, text colors, background color using this method, but you can using the property node of an indicator. Is this true?

0 Kudos
Message 4 of 6
(3,436 Views)

Hi Coutts,

 

Good Morning and I hope your well today.


Thanks for the kudos and marked answer.

 

You can alter the controls/indicators fonts etc.

 

You need to get a reference to Controls[] which includes all controls and indicators on a VI. 

Then I have created an array of their Labels.Text - so we know which reference is which.

With a single reference you can then access properties such as label.font where you can alter if the label is

Bold, Unerline,size and colour...

 picture2.JPG

Notice I have selected to Bold and Underline the label of the controls and indicators - and they appear bold and underlined. 

 

I have re-attached the modified code.


Hope it finds you well, 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Download All
0 Kudos
Message 5 of 6
(3,405 Views)
Error on forum - double post. Please ignore.
Message Edited by Hillman on 06-05-2009 10:24 AM
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 6 of 6
(3,405 Views)