Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Workaround for a bug
Message
De
14/06/2001 15:23:33
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00519598
Message ID:
00519667
Vues:
14
>I have only tested this code for the conditions in it. There may be other factors that prevent a control from receiving focus, like visible property.
>local loMinControl
>loMinControl = .null.
>for each loControl in ThisForm.Controls
>   if isnull(loMinControl)
>      if upper(loControl.BaseClass) <> "GRID" and pemstatus(loControl, 'SetFocus', 5) and loControl.Enabled
>         loMinControl = loControl
>      endif
>      loop
>   endif
>   if upper(loControl.BaseClass) <> "GRID" and pemstatus(loControl, 'SetFocus', 5) and loControl.Enabled
>      if loControl.TabIndex < loMinControl.TabIndex
>         loMinControl = loControl
>      endif
>   endif
>endfor
>if not isnull(loMinControl)
>   loMinControl.SetFocus()
>endif
>
That works.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform