Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capture field data with cursor
Message
De
09/12/2009 04:05:48
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01438152
Message ID:
01438166
Vues:
60
>i was afraid it was going to take off in that direction stefan. actually i am working in a browse - dead in the water i should imagine.
>

Hi Karen,

I'd say a Grid or distinct textbox controls might be much easier to handle. But even using Browse you can for instance add "valid" clauses, or use the Name clause and BindEvent(), e.g.
CLEAR

CREATE CURSOR temp (f1 i, f2 c(20))
INSERT INTO temp VALUES (1, 'one')
INSERT INTO temp VALUES (2, 'two')
GO TOP IN temp

PUBLIC oBrowse as Grid && "Public" just for the demo
BROWSE NAME oBrowse NOWAIT
oBrowse.Move(50, 20, 80, 20)

PUBLIC oHandler
oHandler = CREATEOBJECT('BrowseHandler')
BINDEVENT(m.oBrowse,'AfterRowColChange', oHandler,'ValidHandler')
RETURN


DEFINE CLASS BrowseHandler as Custom
	PROCEDURE ValidHandler(nColIndex)
		? temp.f1, temp.f2
	ENDPROC
	PROCEDURE Destroy
		UNBINDEVENTS(This)
	ENDPROC
ENDDEFINE
hth
-Stefan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform