Move Object in TList
BlitzMax Forums/BlitzMax Programming/Move Object in TList
| ||
I have a TList and I need to move 1 item up or down the list 1 place. My brain is failing me and I can't seem to even hack something ugly together that works. Any suggestions on how to accomplish this? |
| ||
Have you researched the sort commands yet? |
| ||
I was looking at SortList as an option but the list order is what I'm using for my item order, so to move something up or down, as I understand it, I would have to be able to compare two items to determine which goes above another, but the way I currently determine what is above something else is just it's order in the list so I would need a second way of tracking an item essentially to be able to shift it. |
| ||
|
| ||
oooo that looks like exactly what I need thank you! |