Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object List
Message
From
22/06/2001 16:04:27
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
22/06/2001 07:53:14
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00522334
Message ID:
00522617
Views:
8
>Hello everyone,
>
>It's me again :p
>
>How can I get a list of object in a form? To be more specfic, I want to examine
>whether the user have filled in all the textbox or not when he click the submit
>button.
>I want to have a list of textboxes and then check them on by one.
>
>Thanks a lot!
>Jimi

Add two custom properties to the Form:
DIMENSION AO_Controls[1]    && Array of TextBox/Control Object references.
N_Controls = 0              && TextBox/Control counter.
In the .Init() Event of your TextBox (sub)class, do the following:
WITH THISFORM
   .N_Controls = .N_Controls + 1
   DIMENSION .AO_Controls[ .N_Controls ]
   .AO_Controls[ .N_Controls ] = THIS
ENDWITH
Later on, you can iterate thru your "textbox list" as follows:
FOR EACH O_TextBox IN THISFORM.AO_Controls
   WITH m.O_TextBox
      ...
   ENDWITH
NEXT
Previous
Reply
Map
View

Click here to load this message in the networking platform