Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help! Multi-Column Dropdown Combo.
Message
De
02/10/1999 23:15:00
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00271898
Message ID:
00272036
Vues:
24
Good to get a reply from Australia Andrew! Not too many of us using VFP down under!

I think your example still lists the first field (i.e. location) as the value in the combo, whereas I want the second field (or both) to be the visible combo value. I don't really want to create a combined field as that requires a monospaced font to look OK. You are also using RowSourceType=6 - Fields, and not 3 - SQL Select.

I have solved it by reversing my two fields and listing Name then Code. The value then takes up the Name. But I really wanted the dropdown list to have Code then Name, with the value being the Name.

David

>Hi David,
>I use a combo all the time for look ups where I display the description, but use the id column as in the code below.
>I have saved one as a class to show you the settings.
>* inv_combobox is just a first sub class from combo
>DEFINE CLASS test2 AS inv_combobox
> Comment = ""
> BoundColumn = 2
> ColumnCount = 2
> ColumnWidths = "200,65"
> RowSourceType = 6
> RowSource = "inv_location.location,inv_location.location_id"
> ControlSource = "inv_transact.from"
> FirstElement = 1
> Height = 24
> Left = 67
> NumberOfElements = 0
> TabIndex = 10
> Top = 133
> Width = 100
> Name = "cboFrom"
>
>ENDDEFINE
>HTH
>
>>I've had no trouble with single column Combo boxes, but now I am trying to create a Dropdown Combo with two columns. The Rowsource is a SQL Select statement into a Cursor. I want the first two columns to display in the list and both be visible after selection.
>>
>>When the Combobox initialises, it is blank.
>>When the list drops down, both columns are showing fine.
>>On selection, only the first column shows in the display. If I can't display both columns, I need the second to display, not the first.
>>
>>How do I get both columns to be visible when the Combobox is first displayed and also after selection?
>>
>>I've tried lots of permutations - and searched the help. There must be something simple I'm missing. Can anyone help.
>>
>>I'm using VFP5a
>>
>>David O'Brien
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform