ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
06-09-2020 02:18 PM
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?
06-09-2020 02:28 PM
You could use the event structure and look for a mouse down event on the ring.
06-09-2020 03:15 PM
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.