Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to set default value for combobox?
Message
De
11/10/2000 15:58:06
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00427909
Message ID:
00428048
Vues:
18
>If you have a combobox, which is dropdown list, after you make your selection, how can you return to default (empty state)?
>Suppose, you have a field in your main table, which may contain a coded value or could be empty. For this field you use a combobox (drop down list). Suppose, you choose something. How then could you return it back to empty state? Seems there is no way, unless you would code some event to do so, say, Right Click.

You'd have to include an empty member of the row source.
e.g.,
WITH thisform
  DIMENSION .aRow(3)
  .aRow[1] = ""
  .aRow[2] = "hello"
  .aRow[3] = "world"
  .cboCombo.RowSourceType = 5
  .cboCombo.RowSource = "thisform.aRow"
  .cboCombo.Requery()

** or
  .cboCombo.RowSourceType = 1
  .cboCombo.RowSource = ",hello,world"
  .cboCombo.Requery()

ENDWITH
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform