Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox mover button update question
Message
 
 
To
22/11/2000 10:26:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00444603
Message ID:
00444648
Views:
11
>>I have a table that I want to load into a listbox with mover buttons so that the client can resequence the order of the rows. The unique key is a sequence number that the client never sees. They will only see the description in the listbox. The description is not unique. So after they move the rows around and then click on OK, how can i match up the rows in the listbox with the rows in the table so that I can rewrite the sequence number? Only the sequence number is unique and the sequence number is not in the listbox. I can not use description, which is in the listbox, since it is not unique.
>>
>>Can I put the sequence number in the listbox but not show it? Any ideas are appreciated.


>Is this sequence number the row id? If so, I would strongly advise against changing it in this manner.

>If not, make the number of columns in the rowsource 1 more than is displayed.
>e.g.
>with this && listbox
> .AddItem("hello")
> .AddListItem("world", .NewItemID, 2)
> .AddListItem("1", .NewItemID, 3) && must be character
>
> .ColumnCount = 2
>endwith
>
>Then the sequence would be combo.List(combo.ListIndex,3)


I am a little confused. First, I only want to display the Description in the listbox. Second, you say "make the number of columns in the rowsource 1 mroe than is displayed". My rowsource is (none) since my rowsourcetype = 0. Why do you AddItem, then AddListItem twice? If I use AddListItem then I can reference the itemid ... is that the idea? But what then do I do with the itemid? I hope to have the old sequence number in the listbox and the new sequence number will be the current order. My newsequence will be 1,2,3,4,5 etc for the number of rows in the listbox.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform