Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus not working on a form
Message
De
27/08/1999 22:00:40
Chris Crachiolo
Blackmoor Associates Incorporated
New York City, New York, États-Unis
 
 
À
26/08/1999 14:42:53
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:
00258091
Message ID:
00258738
Vues:
11
I'm not sure I can give you any specific help, but I do know that I have had lots of problems with the Setfocus method -- sometimes it's ignored, sometimes it generates an error that it shouldn't, and yes, sometimes it behaves differently in the debugger. In these cases I just give up, lose the Setfocus, and find a workaround.

You could just change your tab order so that the desired control gets the focus when the form is initialized. Or, you could stuff the keyboard with KEYBOARD '{TAB}' in those cases where you know which control currently has the focus, and therefore know how many tabs it would take to give the focus to the desired control.

Anyway, this may not even be your problem...


>My posting seems to have disappeared.
>
>Anyway, I am having a problem with my initial login screen. There are 2 text boxes TxtLoginID and TxtPassword as well as 2 buttons, CmdEnter and CmdExit.
>
>I have tried putting Thisform.TxtLoginID.setfocus in the form’s Activate and Init both and cannot get the cursor to come up in that field. I can click on the field and type in it, but can not even tab between fields without hearing the beep.
>
>I can setfous to one of the buttons, and while it shows up – I still cannot tab between fields w/o the beep.
>
>It’s is like the form has lost focus for everything.
>
>All 4 items have Tabstop = .T. and the TxtLoginID is number 1
>
>I ran this in the command window with debugger on and the cursor appears, build an executable and run it and it does not.
>Any ideas?
>
>Thanks
>
>Greg McCammon
>Greg_mccammon@sofsa.sair.com
"Ignorance more frequently begets confidence than does knowledge."
-- Charles Darwin
"I am invincible! Invincible...OWWWWWWWW!"
-- Homer Simpson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform