LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can keep the popup menu item lists staying on the panel ?

Hello,

 

I have created a popup menu for a picture control, by right clicking the picture that can popup the menu item lists. When  clicking a menu item it can show a child panel, at the same time, the menu items disappeared immediately. Is there any way to keep it staying on the panel until the program needs it to disappear?

 

 

David

0 Kudos
Message 1 of 3
(3,063 Views)

I see no way of obtaining this effect: visibility of context menus is handled by the OS so unless there is some specific Windows API which I am not aware of (and it could be perfectly possible) I suppose you cannot let the menu visible after a choice is made by the operator. moreover, when a menu is displayed, the operability of mouse and keyboard is limited to it, in that either you choose a menu item or you click elsewere (or press ESC) to let the menu disappear.

 

An alternative way to have a "menu" always visible could be to tailor a panel to mimic it: single pixel border, stays on top when app is active, some text message to simulate menu items and a panel callback that when the user clicks on it activates a specific function based on mouse coordinates to detect which text message the mouse is on. You may still have problems with panel colour and with menu separators (the latter one possibly faked by a single-pixel-tall horizontal slider) and the items being highlighted when the mouse passes over them.

 

In my opinion, given these limitations it's better to develop a personalized panel with appropriate buttons and the "stays on top" attribute set, which could follow your app aesthetic standards and is easier to program.



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 3
(3,038 Views)

Thanks.

 

David

0 Kudos
Message 3 of 3
(3,028 Views)