LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown box


@Poema wrote:

Thank you all for trying to solve my problem.

As I see there is no easy way, so I will try to create my own xcontrol dropdown box. If someone still has a better idea, please let me know.


Here is what I did:

XCombobox 

 

Not exactly what you want, but might be a useful example.

 

George Zou
0 Kudos
Message 11 of 17
(615 Views)

Top, It's good example to start with

0 Kudos
Message 12 of 17
(602 Views)

@Poema wrote:

In the background is there a calculation that is running continuously but must be temporarily interrupted while the user is selecting another value or want to select another value.


You don't need mouse move for that. In fact, mouse move doesn't mean much, as the mouse might stall for just a while... So you'd need a time out.

 

Also, the user can select a combobox value without using the dropdown, mouse move won't work.

 

In this snippet I

1) changed a click to a right click (activating the menu)

2) on menu activation populate the menu with the ring items

3) on menu dismiss I know the user is done

3) on menu selection I know the user is done and a value was selected

Ring selection detection.png

You can add tags to the active menu item.

 

As a bonus, menus can have layers.

 

This should work with comboboxes too.

Message 13 of 17
(600 Views)

Thanks I will try the example.

FYI  When the mouse events are stopped the calculation may go on because the user is not doing anything and when they go into de text field without the dropdown I have enough other events.

0 Kudos
Message 14 of 17
(585 Views)

For anyone who wants to know. I solved it with the 'keyfocus' property. I start checking the 'keyfocus' value when I enter the dropdown field (mouse enter) and as long as the 'keyfocus' flag is high, I stop the background calculation.

0 Kudos
Message 15 of 17
(484 Views)

@Poema wrote:

For anyone who wants to know. I solved it with the 'keyfocus' property. I start checking the 'keyfocus' value when I enter the dropdown field (mouse enter) and as long as the 'keyfocus' flag is high, I stop the background calculation.


Thanks for sharing your solution.

 

I don't really see how that works, though. The key focus is not directly related to the menu being active.

 

The key focus is lost when you activate the menu, but when do you give the control key focus?

 

If you give key focus on mouse enter, you can detect the menu because key focus is lost. However, how do you detect when the user is done?

0 Kudos
Message 16 of 17
(473 Views)

Hi,

For your information, the solution is working for a 'dropdown box' it was not the intention to use it with the menu. Sorry for the misunderstanding.

 

kind regards,

0 Kudos
Message 17 of 17
(373 Views)