LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

menu similar system tray but on button

Hello, Is it possible create a menu similar to the system tray menù but connected to a button or panel ?. Actually i am using MenuBar but but i am not satisfied.
0 Kudos
Message 1 of 2
(2,980 Views)

Perhaps you could benefit from the use of a popup menu (similar to usual context menus of the operating system). The menu you have designed in the menu bar can be prompted to the user with the following lines in a control callback (here while right clicking on the control but you could choose any other event):

 

    switch (event) {
        case EVENT_RIGHT_CLICK:
            // Context menu
            choice = RunPopupMenu (GetPanelMenuBar (panel), menuID, panel, eventData1, eventData2, 0, 0, 0, 0);
            switch (choice) {

                 // Your code for single cases here

            }

    }

 

 



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,977 Views)