LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Programatically change the environmental options

Solved!
Go to solution
Highlighted

Hi

 

I was refreshing User Interface in my application. One of the elements on the front panel is an enum control. I'd like to change the items background color from white to darker one.

I know that I can change it in Options->Environment->Menu Background, but this sets the all the menus in LabVIEW to this color.

Is there a way to set it programmatically, so when I open this vi, the background color changes to dark, and when I close it, it changes back to white?

Will this still work in executable?

0 Kudos
Message 1 of 4
(965 Views)

You can programmatically set the text/background colour of Enums using the 'RingText.TextColours' property.

You can also set the background/text colour of an individual enum by using the 'Set Colour' tool of the tools palette (View -> Tools Palette).

 

Both of these will work in an executable (runtime engine).

 

For your method to work, you would probably need to use a custom INI file (the INI file that sits alongside an executable and contains LabVIEW INI keys) for your application.



Certified LabVIEW Architect (CLA), Certified LabVIEW Embedded Systems Developer (CLED) and Certified TestStand Developer (CTD)
MediaMongrels Ltd. - NI Alliance Partner | GDevCon :: 21-22nd August 2019 :: Birmingham, UK
0 Kudos
Message 2 of 4
(948 Views)

Hi

 

Sorry, I didn't make myself clear

I was talking about the colour of the dropdown menu, when you click on enum to select an item

It's the setting in the environmental options

0 Kudos
Message 3 of 4
(943 Views)
Solution
Accepted by topic author siadajpan
10-13-2016 12:32 AM

@siadajpan wrote:

Hi

 

Sorry, I didn't make myself clear

I was talking about the colour of the dropdown menu, when you click on enum to select an item

It's the setting in the environmental options


Apologies - in that case you will need to read/write to the LabVIEW configuration file - either for your development environment (LabVIEW.ini) or for the executable (the MyApplication.ini file). The changes to the file will only take effect on restarting LabVIEW/your application. With your application, however, you can use a custom INI file which can contain the necessary configuration keys for setting the dropdown menu colour - you'll find the option in the build specification for the executable. I find it easiest to build the application, find/copy the INI file to your LV project, make your changes and then set the modified one as the custom INI file.



Certified LabVIEW Architect (CLA), Certified LabVIEW Embedded Systems Developer (CLED) and Certified TestStand Developer (CTD)
MediaMongrels Ltd. - NI Alliance Partner | GDevCon :: 21-22nd August 2019 :: Birmingham, UK
Message 4 of 4
(939 Views)