Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shortcut menu relative to command button
Message
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00867966
Message ID:
00867967
Views:
27
This message has been marked as the solution to the initial question of the thread.
Hi Phil,

You can temporary switch form scale mode to Foxels to calculate shortcut menu position.
Thisform.ScaleMode = 0		&& Foxels
lnPosX = This.Left + This.Width
lnPosY = This.Top + This.Height
Thisform.ScaleMode = 3          && Back to Pixels
DEFINE POPUP test SHORTCUT RELATIVE FROM (lnPosY), (lnPosX)
DEFINE BAR 1 OF test PROMPT "Menu 1" 
DEFINE BAR 2 OF test PROMPT "Menu 2" 
ACTIVATE POPUP test
>I am struggling trying to get a shortcut menu to be displayed relative to the command button which calls it.
>
>The "print" button is calling the shortcut menu with a simple DO COFC.MPR command.
>
>The shortcut menu works as desired, except it is diplayed at the location of the mouse pointer. I want the top left corner of the menu to be anchored to the bottom right corner of the command button.
>
>Can someone shed some light on this for me??
>
>Thanks.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform