Author: Tomas Rutkauskas
How can I move a list item of a TListView one postion down or up?
Answer:
1 var2 item: TListItem;
3 begin4 with lvlist do5 begin6 {preserve item since currentPos will be invalid after next line}7 item := items[currentPos];
8 {make a new item and assign to it}9 items.insert(moveToPos).assign(item);
10 {old item will now remove itself from the listview}11 item.delete;
12 end;
13 end;