in reply to Win32::GUI won't display an NI menu properly
I originally created my menu to look like "File" and under that "Exit" like most other Windows applications. This creates two entries in $menu_popup, "File" and "File_Exit".
In my code above I was trying to display the menu starting from and including the "File" option, however this was not working.
I changed my RightClick code to be:
and it now works inasmuch as when I right-click the notification icon it display a menu with "Exit" in it. I also found that I could expand the menu by adding lines similar to the ">E&xit" one, so the code now displays the menu list that would appear under the "File" menu button.sub NI_RightClick() { print "NI_RightClick event called.\n" if ($debug); $win_main->TrackPopupMenu($menu_popup->{File}, Win32::GUI::GetCurs +orPos()); }
So, my problem is resolved but the issue still exists. It may be that this is the way it's supposed to work and you cannot pass a Win32::GUI::Menu item to the TrackPopupMenu() function but other posts and examples suggest that this is exactly what you should pass to this function.
Ah well, it's working for now, thanks for looking, providing me with help on formatting and your suggestions for the solution. |\/|artin
|
|---|