Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box in grid, lookup and display
Message
De
03/11/2000 21:11:02
 
 
À
03/11/2000 20:08:59
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00437864
Message ID:
00437947
Vues:
25
>Thank you for your assistance. My grid's Combo Box behavior has improved. But the only way (yet) I've had any luck displaying descriptions is when combo.RowSourceType == 6 (fields) and the column's Sparse == .F.

RowSourceType = 6 works, too - just set the RowSource = "cuCursor.description,idfield"

Sparse should be .F.

>
>Such a Combo Box pretty much functions as I want IF combo.Style == 2 (dropdown list). But, where I "really" need to go, however, is combo.Style == 0 (dropdown combo) so I can enable the user to add brand new descriptions.
>

There will be a lot more coding for this - the Style=0 doesn't work as advertised (IMO). You have to make sure when the user enters something not in the list (RowSource) that it gets added to the list (RowSource). Otherwise, the next time you enter that record - the combobox will blank out it's bound field.

Also, how are you going to get the new info into the combo if you are storing the ID instead of the description? How's the user going to enter that?
Just asking...

>The problem: With Style == 2 the description is truncated to the length of the lookup ID as soon as the combo box column has had focus. Is there a way around this?

Set combo.ColumnWidths to something like "100" - wide enough to show the description field.
>
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