Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set focus without using setfocus()
Message
De
26/02/2004 21:25:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
26/02/2004 21:08:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00881299
Message ID:
00881336
Vues:
46
>I agree with your approach of doing a form level valid completely. And we are moving to doing more of this.
>However our large existing app has around 400 forms - so it would be quite a task at this stage.

Yes, that looks like a lot of work.

>So we've taken to KEYBOARDing CHR(9) s to workaround the setfocus issue. But this is a horrible kluge.

That should be more or less equivalent to valid (number). Also a kludge: in both cases you have to count objects, and adjust if you insert additional objects.

BTW, with the KEYBOARD command, I think you can also use "{TAB}" instead of chr(9). This might make it more readable.

As a workaround, if you can't SetFocus() within the Valid() event, you might postpone it with a Timer (with a brief interval). But I don't know whether this works; perhaps the Valid() will then fire again.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform