Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DODEFAULT with parameters
Message
De
07/08/2001 18:31:53
 
 
À
01/08/2001 08:05:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00538014
Message ID:
00541025
Vues:
15
Well OK everyone. Thanks SOOO much for your help.

This is how I got it to work:

1) I seperated the View parameter gcLastName from the object's ControlSource.

2) I loaded it in the Keypress event using the following code that I stole from
Ingrid.
***********************************************************************
***   Process the keys to the gcLastName parameter of the ChildList
***   view & requery the view.
***********************************************************************
DO CASE
	CASE BETWEEN(m.nKeyCode, 32, 126) OR m.nKeyCode = 128	&& AlphaNumeric
		gcLastName = UPPER( ALLTRIM( This.Value ) + CHR(nKeyCode) )
	CASE m.nKeyCode=127	     && Backspace
		IF LEN(THIS.Value) < 1
            *This.Value = ""
            gcLastName = ""
			IF SET("BELL")="ON"
				?? CHR(7)
			ENDIF
		ELSE
			gcLastName = LEFT(THIS.Value, LEN(THIS.Value) - 1)
		ENDIF
	CASE m.nKeyCode=7
	OTHERWISE
ENDCASE


3) Manually run the grid & view

* Requery the view
REQUERY("ChildList")
* Refresh the grid
ThisForm.grdChildList.Refresh()
* Now run the default processing for the txtObject
4) Then let the normal code run naturally. I never did get the
lnX = DODEFAULT(nKeyCode, nShftAltCtl ) stuff to work.

There is something missing in my understanding of how DODEFAULT reacts in this
situation but all is functional so I am moving on.

Thanks again for all your help

Terry
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform