Главная страница
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.012 c
14-26743
Сюткин Павел
2003-05-22 14:43
2003.06.09
Private свойство


8-26610
Сашок
2003-02-25 15:19
2003.06.09
Фон в TextOut


14-26712
chuvak
2003-05-21 14:52
2003.06.09
Подскажите где найти полный список хуков и их описаний


1-26565
BJValentine
2003-05-26 15:45
2003.06.09
TStringGrid


1-26531
dfgdfgsdg
2003-05-27 21:06
2003.06.09
Как активировать форму?