Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why? Can't create 2 column listbox
Message
De
01/04/1998 14:25:34
 
 
À
01/04/1998 13:44:02
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00088746
Message ID:
00088756
Vues:
29
>I'm trying to create a 2 column listbox from the listbox's container's INIT method with the following code:
>
> SELECT lvesin
> n=1
> SCAN
> This.LstSource.AddItem(lvesin.dispval,n,1)
> This.LstSource.AddItem(lvesin.codeno,n,2)
> n=n+1
> ENDSCAN
>
>I'm using the "n" to indicate the nIndex value in the ADDITEM statement. The listbox comes up with first no dispval in column 1, but all my codeno's in column2, then all dispval's in column1 and no codeno's in column2.
>
>Now:
> | 001
> | 002
> | 003
>apples |
>bananas |
>oranges |
>
>Instead of:
>apples | 001
>bananas | 002
>oranges | 003
>
>What am I doing wrong?
>
>Mandy

Hi Mandy,

To add to what Edward said, what I have usually done is use AddItem() to add the the first ( column1 ) item, then use AddListItem() to add in the other columns' data. And, I haven't played with it a lot, but I believe it's necessary to do it this way.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform