Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drilling Down to Objects
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00570451
Message ID:
00570511
Vues:
61
This message has been marked as the solution to the initial question of the thread.
>Thanks Larry,
>
>I was not sure if it respected Tab order. Exactly the information I was interested in learning.
>
>One day I'll learn to frame my questions more precisely.
>
>Have a wonderful day.

Unfortunately, I'm not. :-(

Objects does not respect Tab order. It respects instantiation order. In this case, the way you would go about ordering things would be to use Send to Back/Bring to Front. Since this takes a lot of effort on your part, you could store the TabIndex along with an object reference. Compare the stored TabIndex with the one of the currently failing control and if higher, store that as the object to use when you SetFocus.
local loSetFocus, lnTabIndex, lox
loSetFocus = .NULL.
lnTabIndex = 0
for each lox in MyContainer.Objects
   if !ox.Validation() then
      if isnull(loSetFocus) then
         loSetFocus = lox
         lnTabIndex = lox.TabIndex
      else
         * we already set an object reference; check to see if new object is higher in the tab order
         if lox.TabIndex < lnTabIndex then
            loSetFocus = lox
            lnTabIndex = lox.TabIndex
         endif
      endif
   endif
endfor
if !isnull(loSetFocus) then
   loSetFocus.SetFocus()
endif
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform