Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object List
Message
De
22/06/2001 16:04:27
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
À
22/06/2001 07:53:14
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00522334
Message ID:
00522617
Vues:
9
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform