Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Activate popup on right click in a grid
Message
 
 
À
31/07/1998 09:25:07
Francois Liboiron
National Bank of Canada
Montréal, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00123022
Message ID:
00123303
Vues:
24
>I want to activate a popup when i rightclick. I dont no how to do
>the popup and how to move the popup near the grid.
>thank you

In a previous edition of FPA, one of the regulars published an article of how to do this. Basically, you created (in VFP 5) a menu and select the shortcut option. You use the VFP system names for Cut Copy and Paste (see code below). In the right-click method of your textbox, editbox class put this line of code --

do edit.mpr with This

The menu code looks like:
lParameters loObject
*       *********************************************************
*       *                                                         
*       *                      Menu Definition                    
*       *                                                         
*       *********************************************************
*
DEFINE POPUP shortcut SHORTCUT RELATIVE FROM MROW(),MCOL()
DEFINE BAR _med_copy OF shortcut PROMPT "\<Copy" ;
	KEY CTRL+C, "Ctrl+C" ;
	SKIP FOR loObject.SelLength = 0 ;
	MESSAGE "Copies the selection onto the Clipboard"
DEFINE BAR _med_cut OF shortcut PROMPT "Cu\<t" ;
	KEY CTRL+X, "Ctrl+X" ;
	SKIP FOR loObject.SelLength = 0 ;
	MESSAGE "Removes the selection and places it onto the Clipboard"
DEFINE BAR _med_paste OF shortcut PROMPT "\<Paste" ;
	KEY CTRL+V, "Ctrl+V" ;
	SKIP FOR len(_ClipText)=0 ;
	MESSAGE "Pastes the contents of the Clipboard"
DEFINE BAR _mfi_sp100 OF shortcut PROMPT "\-"
DEFINE BAR _med_find OF shortcut PROMPT "\<Find..." ;
	KEY CTRL+F, "Ctrl+F" ;
	MESSAGE "Searches for specified text"
DEFINE BAR _med_finda OF shortcut PROMPT "Find A\<gain" ;
	KEY CTRL+G, "Ctrl+G" ;
	MESSAGE "Repeats the last search"
DEFINE BAR _med_repl OF shortcut PROMPT "R\<eplace..." ;
	KEY CTRL+L, "Ctrl+L" ;
	MESSAGE "Replaces specified text with different text"
DEFINE BAR _mfi_sp200 OF shortcut PROMPT "\-"
DEFINE BAR _med_slcta OF shortcut PROMPT "Se\<lect All" ;
	KEY CTRL+A, "Ctrl+A" ;
	MESSAGE "Selects all text or items in the current window"

ACTIVATE POPUP shortcut
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform