Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Confused about combobox / listbox properties
Message
 
 
À
31/07/2002 18:40:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00684277
Message ID:
00684834
Vues:
44
Combobox always shows the first column, when it's not drop-down. So, your only choice would be to re-arrange arays's columns or use Sergey's approach.

>>>In the present case I am stuck with using the 2nd column for display and the 3rd column as the data to be bound to the control source. How do I do that?
>>
>>To rearrange fields displayed, select:
>>Combobox.RowsourceType=6 and specify the fields in order as follows:
>>Combobox.Rowsource=tablename.field3,field1,field2,etc...
>>Specify the field you want to populate the ControlSource in the Value property as:
>>Combobox.Value=tablename.fieldname
>>I think this should work for this specific problem.
>
>Thanks for your response, Irv. I meant I am stuck with a three column array where the first column is a throwaway, the second column should be shown in the dropdown and in the combobox itself, and the third column has the actual key to be saved in the controlsource.
>
>I found how to show the second column in the dropdown:
>Combobox.ControlSource = "Table.Field"
>Combobox.BoundColumn = 3
>Combobox.RowsourceType = 5
>Combobox.Rowsource = "Thisform.aRows"
>Combobox.ColumnCount = 2
>Combobox.ColumnWidth = "0,150"
>
>I still have the problem that when the combobox is closed it shows the first array column, but I want it to show the second array column, like the dropdown does.
>
>Any ideas? Thanks.
>
>Alex
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform