LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two 'themes'

Hello:

It's posible to have two colors 'themes' (buttons, graphs, text)  in one VI, and select one of them with a selector or by an event detector?

Regards,
Felipe Leiva
0 Kudos
Message 1 of 4
(2,917 Views)
There has been a proposal on 'skins' (I think it was in the LavaG forums) using seperate FPs for each skin/theme and an eventhandling VI that registers dynamically for the FP events. This will allow you to scale to more themes if desired.

Felix
0 Kudos
Message 2 of 4
(2,908 Views)
Yes you can do this. I do not talk about the effort here only the technical aspects.
 
First you have to design your themes. Do the following steps:
Create the FP as you want it to look like.
Next create a VI which will read out all properties of the controls and indicators regarding the apperance like bounds, colors, font attributes. Store this information into an arrray of cluster and write it to an XML-File. Now create a VI which will read the XML-File and set all the attributes. Both VIs will just receive the reference to the VI you will change it appearence. If you name the XML-File like "VIName_Theme_x" you can have you can have as much Themes as you like.
 
To generate the second theme you can either create it by changing the VI and store it in another XML-File or you can edit the XML-File with an editor.
 
Another approach is, if you are able to find the tools for it, to change the files in the folder shared\LabVIEW Run-Time\<x.y>\models.
But changing this way you will need to restart LabVIEW.
 
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 3 of 4
(2,902 Views)
Found by accident what I was referring to my last post:

http://zone.ni.com/devzone/cda/tut/p/id/3085

Felix

0 Kudos
Message 4 of 4
(2,842 Views)