Главная страница
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.028 c
7-26803
zolotov
2003-04-05 19:56
2003.06.09
Kernel32.dll в Win2k. Скрытие приложения при нажатии Ctrl+Alt+Del


14-26766
Тумар
2003-05-23 09:20
2003.06.09
Есть над чем подумать


3-26405
JustNobody
2003-05-18 21:03
2003.06.09
Экспорт данных в Excel


14-26673
Akni
2003-05-21 12:04
2003.06.09
E-Mail Attach


3-26402
vlad451
2003-05-21 17:33
2003.06.09
Использование DataAware компонентов