Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ThisForm.FirstObject.SetFocus
Message
De
19/11/2001 09:59:52
 
 
À
17/11/2001 11:27:23
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00582940
Message ID:
00583411
Vues:
52
>>>
>>>...
>>>If oCtl.TabIndex < lnIndex
>>>   IF PemStatus(oCtl,"SEtfocus",5)
>>>      lnIndex = oCtl.TabIndex
>>>      This.FirstControl = oCtl.Name
>>>   ENDIF
>>>Endif
>>>...
>>>
>>>
>>>Don't forget to check if the found control has a SetFocus method. Also the code didn't deal with the only control in the fomr being a pageframe or grid, whereon you would need to drill into those objects to find the "first" control.
>>
>>You've got a point there. Either that or check for the Tabstop property.
>
>Even controls with tabstop=.f. may still receive focus. I've seen it done with a few commandbuttons, where they would not get into taborder, but were clickable (when they would get focus) or had hotkeys.

I meant to check for the existence of the property, regardless of Tabstop setting. The issue was that the code didn't check if the control had a Setfocus method, as is the case with labels.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform