ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ring Control State

Is it possible to determine programmatically if the dropdown list of a ring control is being displayed? In other words, is there a way to determine at run-time which of the two states shown below the ring control is in?

 

ring.png

0 Kudos
Message 1 of 3
(2,073 Views)

You could use the event structure and look for a mouse down event on the ring.

Tim
GHSP
0 Kudos
Message 2 of 3
(2,069 Views)

LabVIEW is really going to fight you on this one.

 

The Mouse Down path is fraught with peril.  You can click in the label area and not get the operation menu.  Speaking of which, the operation menu is separate from the ring control, so the mouse actually leaves the ring when you enter the menu.  Plus, you can use the keyboard to activate the menu, circumventing the Mouse Down event.

 

You can, however, use the Operation Menu Activation event to determine when the menu is displayed.  But that is only half of the battle.  The corresponding Operation Menu Dismissed event only fires when you cancel the operation (click outside the menu, hit escape, click the chevron again, ...).  That event is not fired when a new selection is made.  OK, you can also try to use the Value Change event to catch new values which means a new selection was made and the menu is dismissed.  This event does not fire when you re-select the current value, so you are stuck when the user does that...

 

Kind of sad that there is not an Operation Menu Closed event, or that the Operation Menu Dismissed event operated like that.

Message 3 of 3
(2,035 Views)