Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reordering a List
Message
From
05/11/1997 19:54:39
 
 
To
05/11/1997 11:17:04
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00058374
Message ID:
00058518
Views:
32
>>Does anyone know if in Visual FoxPro 3.0 one can create an editable list similar to the MODIFY STRUCTURE window in which you can insert items, delete items, edit items, and reorder the list.
>>
>>A list in which you can reorder the items but cannot insert, delete or edit would be a second-best substitute since those functions could be handled in other ways.
>>
>>If one were to limit oneself to a list of finite length, I can imagine doing it with container objects (one for each "row"), but I just don't see how to do it with a list of indeterminate size.
>>
>>Anyone have any ideas?
>
>MODIFY STRUCTURE window represents grid which looks like list. If you are ready to sacrifice type-in feature, then you can use list control too. The idea is following: any time you want to insert/delete/edit/sort list, you actually do these operations on List.Rowsource (e.g. cursor) and List.Requery when necessary.


I was able to do this by taking the list of data and building
a comma-delimted list. I used the list box on the form and
changed the moverbars to .T. and used RowSourceType = "Value". I
stored this variable in the RowSource of the list box. Using
interactive change you can know the value of the list when
the user saves. Perhaps, if you include some kind of integer
field with your list, you can then re-number them based on
the resorted comma-delimited value.

I can't remember all the steps but hopefully this will point
you in the right direction.

HTH

Dan
Previous
Reply
Map
View

Click here to load this message in the networking platform