Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

popup menu

Status
Not open for further replies.

newapocalipsis

Programmer
Aug 10, 2001
48
MX
how to activate a popup from the point i´ve clicked reght button??
 
Hi apocalipsis,
Write a program as follows
** MYPOPUP.PRG **
DEFINE POPUP myPopup SHORTCUT RELATIVE FROM MROW(),MCOL()
DEFINE BAR 1 OF myPopup PROMPT "Option 1"
DEFINE BAR 2 OF myPopup PROMPT "Option 2"
DEFINE BAR 3 OF myPopup PROMPT "Option 3"
DEFINE BAR 4 OF myPopup PROMPT "Exit"
ON BAR 1 OF myPopup ACTIVATE POPUP myPopupsh1
ON SELECTION BAR 2 OF myPopup messagebox("You pressed "+prompt())
ON SELECTION BAR 3 OF myPopup messagebox("You pressed "+prompt())
ON SELECTION BAR 4 OF myPopup DEACTI POPUP myPopup

DEFINE POPUP myPopupsh1 SHORTCUT RELATIVE
DEFINE BAR 1 OF myPopupsh1 PROMPT "Option 1 ->> Part One"
DEFINE BAR 2 OF myPopupsh1 PROMPT "Option 1 ->> Part One"
ON SELECTION BAR 1 OF myPopupsh1 messagebox("You pressed "+prompt())
ON SELECTION BAR 2 OF myPopupsh1 messagebox("You pressed "+prompt())

ACTIVATE POPUP myPopup


Then anywhere in your form write
ON KEY LABEL RIGHTMOUSE DO myPopup.PRG

Now wherever on the form you will right click your mouse button the declared popup will be shown up.


Hope it helps you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top