LabVIEW

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

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
(664 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
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 7
(644 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
(635 Views)

Hi volfi,

 

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

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 4 of 7
(629 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! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(600 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
(588 Views)
Highlighted

@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
(574 Views)