Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetFocus by using Key Label
Message
De
17/10/2000 23:43:52
 
 
À
17/10/2000 12:53:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00430406
Message ID:
00430726
Vues:
11
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform