Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't get Setfocus to work on a field
Message
De
26/08/1999 22:44:45
 
 
À
26/08/1999 14:03:29
Greg Mccammon
Raytheon Systems Company
Lexington, Kentucky, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00258065
Message ID:
00258252
Vues:
12
TabStop is by default .T.. Try this:

*!* Begin
public oLogin
oLogin = crea([oForm])
oLogin.show

define class oButton as commandbutton
enddefine

define class oText as TextBox
enddefine

define class oForm as Form
add object TxtPassword as oText with ;
top = 20, ;
left = 120
add object CmdEnter as oButton with ;
top = 60, ;
left = 20
add object CmdExit as oButton with ;
top = 60, ;
left = 120
add object TxtLoginID as oText with ;
top = 20, ;
left = 20

proc init
this.TxtLoginID.setfocus
endproc
enddefine
*!* End

>I have a login screen which has two test boxes: TxtLoginID, & TxtPassword.
>
>It also has two buttons, CmdEnter & CmdExit
>
>I have tried Thisform.TxtLoginID.setfocus in the INIT Event and Activate both of the form and cannot seem to get it to work.
>
>When the form comes up and focus is supposedly set to one of my text fields then the cursor does not show and pressing Tab gives you the default beep.
>
>I tested setting the focust to a button, and whilt it does appear to have the focus, pressing tab also gives you the default beep.
>
>Tabstop on all 4 items set to .T. Order is LoginID, Password, Enter, Exit
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform