Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.06.09;
Скачать: CL | DM;

Вниз

Сортитровка в TList   Найти похожие ветки 

 
zeppelin ©   (2003-05-29 15:27) [0]

Добрый день.
Подскажите пожайлуста, как работать с Sort в TList.
Спасибо.


 
reonid ©   (2003-05-29 15:37) [1]

function SomethingCompare(Item1, Item2: Pointer): Integer;
begin
if TSomething(Item1).Value = TSomething(Item2).Value then Result := 0
else if TSomething(Item1).Value > TSomething(Item2).Value then Result := 1
else if TSomething(Item1).Value < TSomething(Item2).Value then Result := -1;
end;

ListOfSomething.Sort(SomethingCompare);


 
Palladin ©   (2003-05-29 15:44) [2]

в справке пример есть!



Страницы: 1 вся ветка

Текущий архив: 2003.06.09;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.022 c
4-26844
Gefest
2003-04-11 21:03
2003.06.09
Как создать StringGrid только через API?


14-26728
Gluk_v_2.0.1
2003-05-22 13:19
2003.06.09
Сайт


3-26343
OlegID
2003-05-20 11:06
2003.06.09
DBGrid


1-26557
McSimm2
2003-05-28 10:36
2003.06.09
Tlist.Sort


1-26545
OlegM
2003-05-28 09:36
2003.06.09
Про фришты