Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order of loControl
Message
 
 
À
24/10/2002 16:56:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00715160
Message ID:
00715236
Vues:
17
This message has been marked as the solution to the initial question of the thread.
Steve,

You can iterate the thisform.Controls collection and check the .TabIndex and build an array in that order, then iterate the array
local laTabOrder[this.ControlCount]
for each loControl in this.Controls
   laTabOrder[loControl.TabIndex] = loControl
endfor

for each loControl in laTabOrder
   * do your stuff
endfor
>I have a form with controls. During the saving of the record the program validates the data. Each control has a property - .lRequired that is .t. if the control is required to be filled in with data - a name for example. I would like for loControl to be in the tabindex order of the screen. I am trying to write a more universal routine than the one we have now that checks a control at a time. We seem to forget to include validation when we turn on one control at a time. Duh, huh? The problem is that the one we have now checks the controls one at a time in the order they occur in the .rec_valid method and we can place them there in any order we want. The one I am writing now checks the controls in the order of loControl array. I'm looking for a way to easily order the loControl array to match the order of the tabindex for the screen. Comments?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform