Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFPx OOP Menu project
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01445392
Message ID:
01445461
Vues:
61
Sounds good... But... instead of modifying base class I did the following:
Subclassed SFPad. Modified the DefinePad code in this subclass
VOILA! I have the needed functionality

I would like to modify it to work thusly:
Based on the property lIsCommand - meaning that it is a command not a popup, I would like to execute the new method ExecuteCommand.
This code mod, I might add to your base class sfPad.

Basically this is what I did to the subclass DefinePad method.
Note: .cOonClickCommand = oAppl.DoForm('OrderEntry')
.....
* Define the pad.

	define pad &lcPadName of _msysmenu prompt .cCaption color scheme 3 ;
		&lcPosition &lcSkipFor message .cStatusBarText negotiate left, right ;
		&lcClauses
	IF EMPTY(.cOnClickCommand)
		on pad &lcPadName of _msysmenu activate popup &lcPopupName
	ELSE
		lcClauses=.cOnClickCommand
		on SELECTION pad &lcPadName of _msysmenu &lcClauses
	ENDIF 
i.e. What I would like to to do:
	IF NOT(.lIsCommand)
		on pad &lcPadName of _msysmenu activate popup &lcPopupName
	ELSE
		on SELECTION pad &lcPadName of _msysmenu this.ExecuteCommand()
	ENDIF 
Does this make sense?

Thanks,
Mike

>Hi Mike.
>
>>The sfPad base class does not have a cOnClickCommand, so how do I execute the code oAppl.DoForm("FormName") when the user clicks on this menu pad?
>
>You have the source code for SFPad. It shouldn't be too hard to add that property and in DefinePad use it in the ON PAD command.
>
>Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform