Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capture field data with cursor
Message
From
09/12/2009 04:05:48
 
 
To
09/12/2009 03:04:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01438152
Message ID:
01438166
Views:
59
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform