Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why? Can't create 2 column listbox
Message
From
01/04/1998 14:25:34
 
 
To
01/04/1998 13:44:02
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00088746
Message ID:
00088756
Views:
28
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform