LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to change the background color of the frontpanel - programmatic

Hi,
how can I change the background color of the frontpanel while my programm is still running?
0 Kudos
Message 1 of 8
(4,060 Views)
With properties, class VI. Take a look at this code.


Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 8
(4,055 Views)
Can you save it with LabVIEW Version 7.0? I can't open it in version 7.1.
Thanks.
0 Kudos
Message 3 of 8
(4,051 Views)
Here it is.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 8
(4,050 Views)
Thanks a lot.
0 Kudos
Message 5 of 8
(4,046 Views)
Hello there,

thanks for the tip, also I was interested in this, so I also profited from your code.

but: within LabView 8.0 I cannot select the COLOR Property of the second property node.

what I did: I tried to create your code simply new within my program, clicking the property nodes in place but I am not given the option COLOR in the pop-up menu, after the property node has change to PNL. However, simply copying your edited node and running it in LV8 still gives the desired result. It seems that in LV8 Nat.Inst is trying to prevent users from doing this, and hide this function or was I looking in the wrong menu?

Will doing so affect the stability of the code? I want to let the panel turn red, when the DAQ hardware is active and turn back grey when it's off, so a malfunction at this point could affect devices that are connected for real, that's why I'm asking.

best regards,
Ch.B.
0 Kudos
Message 6 of 8
(3,977 Views)
In LV 8.0, NI divided the front panel into panes and moved some of the Panel class properties into the Pane class. My guess would be that this holds true for this property as well. I believe that if you had not actively created panes, then what you're seeing would be the first pane and you can simply get the Panes[] property from the panel and index out the first element into a property node. You should then probably have the color property.

___________________
Try to take over the world!
Message 7 of 8
(3,976 Views)
Hello tst,

thanks for the tip, you're right: by choosing Panes[] and then wiring the 0th element of the array of references out into a property node, PANE COLOR becomes accessible, and the actual frontpanel changes color.
For the interested ones, I attached a jpg of this code-fragment.

thanks again,
regards,
Ch.B.


0 Kudos
Message 8 of 8
(3,969 Views)