LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DisplayPanel() interferes with menu selection

I have a menu bar open and am looking at the choices. While this is happening, a timer callback hits which calls DisplayPanel() to let the user enter their password and ID. It opens directly behind the panel with the menu. The menu pulldown get's stuck and won't go away until I end-task with ctrl-alt-delete. Is there some way that I can tell that a menu item is open so that I won't pop-open the DisplayPanel?
0 Kudos
Message 1 of 2
(2,898 Views)
I suggest you a workaround to look at...

You could use InstallMenuDimmerCallback. This configures a callback that is called every time the user clicks on the menu bar. This is provided for you to dim some items in the menu that cannot be used in the moment the user accesses the menu bar. For your particular situation, you could set a global variable on entering that function, and display the panel in the timer callback only if that variable is not set. Every function in the menu bar should reset the variable.

The only problem I see is when the user exits the menu without choosing any item (pressing the Esc key for example): in that case no function is executed and the global variable will remain set. Maybe this can be avoided with a panel callback in which to t
rap the Esc key and reset the variable if set, but if the user clicks elsewere in the panel and let the menu disappear, the variable will remain set...

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,898 Views)