Hi,
I would like to enable a popup (context) menu for an item of a OE selection-list. The problem is, that I can click anywhere in the selection-list which shows me the attached popup-menu.
But I would like to know on which item I 'right-mouse-clicked'. But the MOUSE-MENU-CLICK does not activate the item 'clicked'. Is it possbile to first 'apply the Nth entry' of the the selection-list and then show the popup? How to know on which item (Nth) I have pressed?
Is this even possible? If yes, how?
Thanks
Arno
Even when using a browse you need to grab the X and Y of the last mouse event (or so) and compare them to the X and Y of the browse widget and the height in pixels of a browse row.
A similar method may work for the selection list.
Ok, not ideal, but with the X and Y coordinates and the Windows api to open a menu automatically I'm able to get it working.
RUN SendMessageA (selectionlist:HWND, 517, 0, 0, OUTPUT iReturn).
This is not possible.
POPUP-MENU is associated with a widget but not with an item in the widget.
In general, a selection list is only used to select one or more items.
Yes, thank you Dileep. But do you know if it is possibly to apply a left-mouse-click when I do a right-mouse-click somehow?
Perhaps then I could get something working. Or I should rewrite the program to use a browse instead of selection list.
Even when using a browse you need to grab the X and Y of the last mouse event (or so) and compare them to the X and Y of the browse widget and the height in pixels of a browse row.
A similar method may work for the selection list.
Ok, that might work Stefan, thank you. Since I will override the default behavior of the 'right-mouse-click', I need to open the popup menu programmatically. Do you know if that's possible?
Ok, not ideal, but with the X and Y coordinates and the Windows api to open a menu automatically I'm able to get it working.
RUN SendMessageA (selectionlist:HWND, 517, 0, 0, OUTPUT iReturn).