Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus in Valid (or invalid :)
Message
From
09/10/2000 11:24:27
Walter Meester
HoogkarspelNetherlands
 
 
To
09/10/2000 11:05:19
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexico
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00426812
Message ID:
00426827
Views:
21
Hector,

The solution I came up with is using a Timer class:
DEFINE CLASS programmabletimer AS timer

	commandline = ("")
	Name = "programmabletimer"

	PROCEDURE settimer
		LPARAMETERS nInterval, cCommandline

		THIS.Interval=nInterval
		THIS.Commandline=cCommandline
	ENDPROC

	PROCEDURE Timer
		THIS.Interval=0
		cCommand=THIS.Commandline

		&cCommand
	ENDPROC
ENDDEFINE
Drop the timer on your form, and issue the following command from your valid event:

THISFORM.ProgrammableTimer.SetTimer(10,"THISFORM.YourControl.SetFocus")

Whenever VFP enters a wait state (thus after the valid) it fires the timer and your command (whatever it is).

Good luck,

Walter,




>Hi all
>I really need to perform a SETFOCUS inside a VALID event, how can i do this?
>My valid event call a generic code, inside this code i need to perform the setfocus. Does anyone have this problem before?
>
>Thanks in advance
>Héctor L.
Previous
Reply
Map
View

Click here to load this message in the networking platform