- On the screencap, is there two different client with same nick "mia", isn't it...? Because, you don't need to see yourself on your own client... I excluded client itself with a simple if statement.
- You know which item you want to move UP.. First item number is (0) you know this too... So is there any problem to move up ?!
I gave you a link about TListView Item movement above...
Kod: Tümünü seç
procedure ExchangeItems(lv: TListView; var i, j: Integer);
var
tempLI: TListItem;
begin
lv.Items.BeginUpdate;
try
tempLI := TListItem.Create(lv.Items);
tempLI.Assign(lv.Items.Item[i]);
lv.Items.Item[i].Assign(lv.Items.Item[j]);
lv.Items.Item[j].Assign(tempLI);
tempLI.Free;
finally
lv.Items.EndUpdate
end;
end;
Just say
to move the second item to first line. You just put your itemIndex to the second param which exists (1) value ...
Panel thing is good. It will work. Just be carefull that, while the transaction do not accept any GETLIST event, because it will change the Item quene again. After that you automaticaly update it.