Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Filled Combo
Message
De
22/11/1999 12:32:19
 
 
À
22/11/1999 12:04:39
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00293857
Message ID:
00293964
Vues:
23
You will need a table to store the values in permanently. One way you can do this is to establish a table that will contain all the values. In the Init of the combo or the form you can populate the combo with the existing values from the table. As a user inserts values into the combo you can insert the values into the table. You can do this when you load the value into the combo. Or you can do it when the user exits the form. This can depend on various things like is it single-user, multi-user, do all users need to see new values immediately, etc. The possibilities multiply rapidly with the addition of constraints of this type. You should look into table buffering and how to use it as you may need it in this scenario. Before going too far, you should sit down and figure out what needs to happen and when it needs to happen ( i.e. Use Cases ) Then design the combo sub-system to accomodate the needs. As I mentioned, depending on the needs, this kind of scenario can be simple or pretty complicated, so figure out how you need it to work ahead of time, then desing to those needs.

>Well, here's the code in my valid event of the combo:
>
>WITH This
> IF This.ListIndex = 0 AND !EMPTY( This.DisplayValue )
> *** The user typed in an entry not in the list
> *** code here to add the new entry to the combo's RowSource
> This.AddItem( This.DisplayValue )
> This.Requery()
> This.Refresh()
> ENDIF
>ENDWITH
>
>The problem actually is that the choices aren't staying permanently. When I exit the form and run again, all choices are gone. After I fix that, then I'll address the removal problem.
>
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform