Hi,

I am trying to create a right-click popupmenu in VFP similar to when you
right-click in windows and get a menu. I want to have the menu with
pre-defined user options and be able to determine which option the user
clicked on. Is there any way to do this in VFP9?

Thanks

Zoom

Re: How to create a right-click popup menu in VFP? by Fred

Fred
Sat Sep 29 09:42:59 PDT 2007

Look in the help for "shortcut menus".

--
Fred
Microsoft Visual FoxPro MVP


"Zoom" <keashdoc@hotmail.com> wrote in message
news:xvCdnSOaE_lR9GPbnZ2dnUVZ_gidnZ2d@comcast.com...
> Hi,
>
> I am trying to create a right-click popupmenu in VFP similar to when you
> right-click in windows and get a menu. I want to have the menu with
> pre-defined user options and be able to determine which option the user
> clicked on. Is there any way to do this in VFP9?
>
> Thanks
>
> Zoom
>
>
>



RE: How to create a right-click popup menu in VFP? by Allan

Allan
Sat Sep 29 21:43:00 PDT 2007

hi zoom,

say you want to add a short-cut menu on the grid's right-click method:

DEFINE POPUP GridPopup ;
FROM MROW(), MCOL() ;
MARGIN ;
SHORTCUT

DEFINE BAR 1 OF GridPopup PROMPT "Add Item"
DEFINE BAR 2 OF GridPopup PROMPT "Edit Item"
DEFINE BAR 3 OF GridPopup PROMPT "Delete Item"

ON SELECTION POPUP GridPopup _screen.activeform.GridPop(BAR())
ACTIVATE POPUP GridPopup
RELEASE POPUP GridPopup

*-- the _screen.activeform.GridPop is a custom method i have in my form
class with the following code:

LPARAMETERS tnBar

DO CASE
CASE tnBar = 1
*-- thisform.GridAddItem()
CASE tnBar = 2
*-- thisform.GridEditItem()
CASE tnBar = 3
*-- thisform.GridRemoveItem()
ENDCASE

DEACTIVATE POPUP GridPopup

hope this would help...

allan

"Zoom" wrote:

> Hi,
>
> I am trying to create a right-click popupmenu in VFP similar to when you
> right-click in windows and get a menu. I want to have the menu with
> pre-defined user options and be able to determine which option the user
> clicked on. Is there any way to do this in VFP9?
>
> Thanks
>
> Zoom
>
>
>
>

Re: How to create a right-click popup menu in VFP? by Paul

Paul
Sun Oct 07 11:16:23 PDT 2007

There's also a sample in the Component Gallery.


"Zoom" <keashdoc@hotmail.com> wrote in message
news:xvCdnSOaE_lR9GPbnZ2dnUVZ_gidnZ2d@comcast.com...
> Hi,
>
> I am trying to create a right-click popupmenu in VFP similar to when you
> right-click in windows and get a menu. I want to have the menu with
> pre-defined user options and be able to determine which option the user
> clicked on. Is there any way to do this in VFP9?
>
> Thanks
>
> Zoom
>
>
>