From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Dropdown menu to select config file.

I have a current VI with multiple config files associated with it. At the moment when loading a config the file is selected in a file explorer window, which is set to open in the folder with the config files and returns the path. What I am wondering is if it is possible to have all of the config files in a dropdown menu rather than opening up a file explorer window. It seems like it should be possible, but not sure if the effort needed would be worthwhile.

0 Kudos
Message 1 of 4
(2,593 Views)

Of course it's possible, however I would only go this way if a customization of the user interface is needed. For example, it may be difficult to select a file with the built-in dialog on a small touchscreen. Another example is when you need to filter out some file depending on a user selection.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 4
(2,582 Views)

Ring controls can be populated at runtime.
If your config files will always be located in known locations, you can pull their paths, convert the path (or just the filename) to a string, and then populate the ring control using those strings.

 

ringControl.png

0 Kudos
Message 3 of 4
(2,580 Views)

You have two choices: 1. a dropdown, 2. a menu

 

1. A dropdown control is quick and easy.  Just read the config file names and load them into a ring control.  Prepend the instruction to "Click to Select".  Be sure  to reset the ring to 0 (the instruction) when changed.

2. A menu should only be used if you have a menu already or there is another need for one.  It can take up an entire stripe of the UI and is more difficult to manage. Every menu item should have a unique Tag to reference it by.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 4 of 4
(2,570 Views)