POPUP Menu Items

was this thread well written (for personal feedback)

  • a:2:{i:73;a:5:{s:12:"polloptionid";i:73;s:6:"nodeid";s:5:"85172";s:5:"title";s:3:"YES";s:5:"votes";i

    Votes: 0 0.0%

  • Total voters
    0
  • This poll will close: .

Resonation

New Member
Hi there I am working on with a popup menu of a browse and trying to change the right click that displays the menu to a double click(or at least allow it double click) . I am using version 10.1.a and have already searched the forums yet found nothing that worked. I tried a statement similar to; Apply "Menu-Drop" to MenuName under the trigger code for double left click on my browse. I have also tried many variations with no results, I appreciate will appreciate any help that anyone can provide.
Thanks, Jon ;)
 
i was actually looking at how to do this too, So i would like to be informed as well if anyone else out there knows how.
 
OK, so if I understand right, you want the popup menu to show when the user double-clicks the browse? If so, keep reading, if not, then just go get a beer or something :toast:

First thing to do is to create your browse and define the popup menu on it (you're probably using the AppBuilder, so that should not take you too long).

Next, in the main section of your window/dialog code place the following (all the way at the bottom will do)
Code:
PROCEDURE SendMessageA EXTERNAL "USER32.DLL":
  DEFINE INPUT PARAMETER winHandle AS LONG NO-UNDO.
  DEFINE INPUT PARAMETER winMsg    AS LONG NO-UNDO.
  DEFINE INPUT PARAMETER winParam1 AS LONG NO-UNDO.
  DEFINE INPUT PARAMETER winParam2 AS LONG NO-UNDO.
END PROCEDURE.

Then add your MOUSE-SELECT-DBLCLICK trigger to the browse (if it is not already there) and put the following "magic" code in the trigger
Code:
RUN SendMessageA (SELF:HWND, 517, 0, 0).

Run and test the workings, it does the trick in my 10.1B and the popup menu shows as expected.

Hope this helps,

Paul
 
Just used this code for a colleague and it works a dream. Many thanks for your answer ;)
 
Back
Top