Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus by using Key Label
Message
From
17/10/2000 23:43:52
 
 
To
17/10/2000 12:53:15
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00430406
Message ID:
00430726
Views:
10
PUBLIC oForm1
oForm1 = CREATEOBJECT([oForm])
oForm1.ADDOBJECT([oCommand1],[Commandbutton])
oForm1.oCommand1.TOP = 25
oForm1.CAPTION = [Hit CTRL+HOME to place focus on the Textbox]
oForm1.oCommand1.VISIBLE = .T.
oForm1.WIDTH = 400
oForm1.SHOW

DEFINE CLASS oform AS FORM
	ADD OBJECT oText1 AS oTextbox
	PROC INIT
	KEYB [{TAB}]
	ON KEY LABEL CTRL+HOME oForm1.oText1.SETFOCUS
ENDPROC
ENDDEFINE

DEFINE CLASS oTextbox AS TEXTBOX
ENDDEFINE
Dave


>How can I set focus to mytextbox on form with ON KEY LABEL ?
>In myForm.Activate() I used code:
>"ON KEY LABEL CTRL+HOME ThisForm.myTextBox.setfocus()" .
>It does not work since reference ThisForm. can be used in form's methods only.
>
>Might be I can do it through _SCREEN.forms.....
>However, may be there is a simple way to do it ?
>TIA
>
>Ed
Previous
Reply
Map
View

Click here to load this message in the networking platform