Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Order of loControl
Message
 
 
To
24/10/2002 16:56:39
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00715160
Message ID:
00715236
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform