Вверх:
Код:
var
currentstring:string;
ix:Integer;
begin
if ProtocolList.Items.Count>0 then
if ProtocolList.ItemIndex<>0 then
begin
ix:=ProtocolList.ItemIndex;
currentstring:=ProtocolList.Items[ix];
ProtocolList.Items.Delete(ix);
Dec(ix);
ProtocolList.Items.Insert(ix,currentstring);
ProtocolList.ItemIndex:=ix;
end;
end;
Вниз и удаление сам додумаешь.
__________________
Некоторые программисты настолько ленивы, что сразу пишут рабочий код.
Если вас наказали ни за что - радуйтесь: вы ни в чем не виноваты.
|