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: 

How can I create a combo box/enum with sub categories

Hi,

 

when creating a combo box in LabVIEW I can edit the items to obtain several options. I would like to have have several sub-Options as depicted below.

How is this possible in LabVIEW?

Best

tmp.PNG

0 Kudos
Message 1 of 7
(3,067 Views)

Hi volfi,

 

in your image you show a menu: you can create them with LabVIEW too, either static or programmatically using the menu functions.

You could also use a tree control to create such a "tree" of items…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,047 Views)

Hi GerdW,

 

thanks for your reply! Yes I am looking for something like the menu functions but I want to place it anywhere on the front Panel, not only the menu bar in the upper left Corner. Thanks!

0 Kudos
Message 3 of 7
(3,038 Views)

Hi volfi,

 

you could create (or "fake") this behaviour by opening some subVIs for each subtree…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,032 Views)

Can't you create a r-click menu with sublevel for a button?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(3,003 Views)

Make a button (or something) on the FP.

Tie the Left-click mouse-down event to an event that handles that button's shortcut menu.  It's a little hacky, but it largely does what you're looking for.

 

leftClickWithMenus_00.pngleftClickWithMenus_01.png

Message 6 of 7
(2,991 Views)

@mud_light wrote:

It's a little hacky,


It's not hacky; this is exactly what "filter" events like "Mouse Down?" exist for.  Here's a similar example: a menu button on a graph.

0 Kudos
Message 7 of 7
(2,977 Views)