Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox - Dropdown combo not saving text
Message
De
19/06/2002 07:53:45
 
 
À
18/06/2002 16:52:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00669906
Message ID:
00670066
Vues:
23
Hello Larry.

I'm using a public array as the row source.

Tsk, tsk, tsk. It would be a lot better if you added an array property to your combo box class and used that as its RowSource. JMHO.

the data only gets saved if I select a value from the array. If I type in a value that isn't, it doesn't save. Am I using this control wrong, or are there additional setup paramaters I'm missing.

You have to take some action to add the value to the control's RowSource whent he user types in something that is not in the list. Code like this, in the combo's valid, will do it for you:
WITH This
  IF NOT EMPTY( .DisplayValue ) AND .ListIndex = 0
    lnLen = .ListCount + 1
    DIMENSION .aContents[ lnLen ]
    .aContents[ lnLen ] = .DisplayValue
    .Requery()
   ENDIF
ENDWITH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform