Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox with no entries
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Combobox with no entries
Divers
Thread ID:
00494738
Message ID:
00494738
Vues:
54
I have a combobox class which uses an array ROWSOURCE. The way my code currently works, the array is populated via a SQL SELECT statement. If no records are retrieved by the SQL, the array has 1 row, with all elements being .F. Conceptually, this is a zero-row array, and therefore a zero-option combobox.

Is there any way to make the combobox NOT drop down in this situation? I tried putting the following code in the DROPDOWN() event:
IF VARTYPE(MyArray[1]) = "F"
   NODEFAULT
ENDIF
but to no avail.

If I can't suppress the drop down, I can instead populate that one row with dummy values -- but then I have to make all of my code handle the possibility that the user has selected the "dummy" row.

Am I missing the obvious solution here?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform