I wonder if anyone could help me out with this, as I'm out of my wits now.
I have a class that features a selector button, upon the pressing of which I want to invoke a context menu. The selection of the button is verified in GM_HANDLEINPUT - this is the place where I need to invoke the pop-up menu.
I tried all sorts of solutions - chooser.gadget and select.gadget in hidden mode, popupmenu.class, and menuclass - none of which really works as I want them to. With the chooser and select, I don't seem to be able to invoke the hidden pop-up at all. The popupmenuclass does not react to IDoMethod(popup, PM_OPEN, window), although I pass it a valid window pointer (the one I obtain from my gadget's GadgetInfo). It goes without saying that my pop-ups are configured OK because they work fine when I put them in a program; it's just the class context that makes them do nothing.
The best solution I could come up with so far is to use the menuclass' context menu feature. This operates via GM_QUERY, where the context pop-up menu is invoked upon receiving and confirming a GMQ_CONTEXTMENU type of query. The problem is, it only works upon pressing the RIGHT mouse button over my selector gadget, whereas I would very much prefer the LEFT button to be the trigger.
Could the menuclass context menu be invoked in some other way, or possibly tricked to react to the left mouse button? I tried sending my class a fake GM_QUERY from within GM_HANDLEINPUT (right after testing the selector) but it just crashed.
Any tips welcome because I'm at a complete loss :-(