Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Right Click Menu on form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01298231
Message ID:
01298368
Vues:
31
Hi John,

I am using some functions which are filled from within a special method, i.e. per BINDEVENT()
* This code is used to generate the menue
MakePopup()
Add2Popup([\<1 My 1st MenuItem],  1,[-])
Add2Popup([\<2 My 2nd MenuItem],  1,[-])
Add2Popup([\-],                  98,[-])
Add2Popup([\<0 Cancel],          99,[-])
ShowPopup()
IF VARTYPE(PopUpMenueSelection) = 'N'
	DO CASE 
	CASE PopUpMenueSelection = 1 
		* Do something here
	CASE PopUpMenueSelection = 2 
		* Do something there
	ENDCASE 
ENDIF 

* These are the specific functions
FUNCTION makepopup
	* Create Popup-Menue
	DEFINE POPUP Pop1 shortcut relative from mrow(), mcol()
	* Declare public variable to hold the selected menue-value
	PUBLIC PopupMenueSelection
ENDFUNC 
**********************************************************
FUNCTION add2popup
LPARAMETERS vPrompt, vValue, vMessage
	* create menue-entry
	DEFINE BAR (vValue) OF Pop1 PROMPT vPrompt MESSAGE vPrompt
ENDFUNC 
**********************************************************
FUNCTION showpopup
	* activate/show popup-menue
	ON SELECTION popup pop1 PopupMenueSelection = BAR()
	ACTIVATE POPUP Pop1
	RELEASE POPUP Pop1 extended 
ENDFUNC 
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform