Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is displaying multiple fields in a combobox possible ?
Message
De
23/08/2000 15:43:45
 
 
À
23/08/2000 15:33:44
Pierre Richard
Méthotech Canada Limitée
Kirkland, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00408420
Message ID:
00408449
Vues:
12
>Hi Trey,
>
>>RowSource = "cursor.field_to_display,field1"
>
>>You can bind the combo to the field1 if you want to by setting BoundColumn=2
>
>Yes the above works fine, but you confirm that it is not possible to display "side by side" 2 fields in a combobox
>(i.e.: customer number , name_of_customer). It has to be 1 field only (any one at that) that will be displayed in the combobox and you can bind any other field from the cursor to be the returned value of the control.
>

Do you mean when the combobox drop-down is not dropped?
Yes, I am confirming that's true, cannot have 2 columns in the text area of the combobox. (Unless you take Ed Rauh's sneaky approach of concantenating the fields together into the first field.)

If you mean in the drop-down, no, I am not confirming that.
You have to set the ColumnCount property to 2, and probably play with ColumnWidths property to get it to look like you want.
e.g.
DEFINE CLASS mycombo AS combobox

  BoundColumn = 2
  ColumnCount = 2
  ColumnWidths = "100,100"
  RowSourceType = 6

  PROCEDURE Init
    SELECT field1, field_to_display ;
      FROM mytable ;
      INTO CURSOR cu_RowSource
    
    this.RowSource = "cu_RowSource.field_to_display,field1"
  ENDPROC

ENDDEF
HTH
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