Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple: Object setfocus in a form
Message
De
31/03/1999 00:45:49
 
 
À
31/03/1999 00:40:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00203750
Message ID:
00203753
Vues:
20
Gan,

The first thing that happens is Form.Load(), followed by Form.Init() (not taking into account the DataEnvironment). At the time of Load, all objects that were created visually in your Form Designer does not yet exist. Between Form.Load() and Form.Init(), the Inits of the objects contained in the form takes place, e.g. cmdButton.Init(), TextBox1.Init(). If any of these fail to INITialize, the form fails to load.

This implies that you cannot put a SetFocus in Form.Load().

Consider setting the TabOrder of the cmdButton to 1. When the form starts, you have the commandbuytton as the first focus.


Kenneth.

>I've created a form with a few buttons and a textbox. When I run the form, I want the Command Button that I want to be SETFOCUS. I have gone through the Help and out some code such as cmdOK.setfocus() in the Load Procedure of the form. However, the error said that Object Not found. I was wondering how I should put it correctly since I already have an object cmdOK in my form.
>
>Thanks.
>
>C.D.Gan
>
>Newbies is like that..
Kenneth.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform