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

Вниз

Listview   Найти похожие ветки 

 
Maksss   (2003-06-25 13:47) [0]

как сделать сортировку в листвиеве не по первой колонке, а по второй и т.д.


 
Poirot ©   (2003-06-25 13:56) [1]

OnCompare + F1 - там всё описано!!!


 
dataMaster ©   (2003-06-25 13:58) [2]

function CustomStringSortProc(Item1, Item2: TListItem; ParamSort: integer): integer; stdcall;
begin
result:=0;
if ParamSort=0 then
if (Item1.Caption)>(Item2.Caption) then Result :=1 else
if (Item1.Caption)<(Item2.Caption) then Result :=-1 else
else
if (Item1.SubItems[ParamSort-1])>(Item2.SubItems[ParamSort-1]) then Result :=1 else
if (Item1.SubItems[ParamSort-1])<(Item2.SubItems[ParamSort-1]) then Result :=-1;
end;

Использовать:
ListView1.CustomSort(@CustomStringSortProc, ColumnIndex);


 
Maksss   (2003-06-25 14:37) [3]

пасибо



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

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

Наверх




Память: 0.47 MB
Время: 0.018 c
7-20320
orion_st
2003-04-24 18:27
2003.07.07
OLE Automation


11-20023
Bartov
2002-10-28 13:50
2003.07.07
Ras and TAPI


4-20353
vic_vm
2003-05-06 15:57
2003.07.07
Ошибка Error creating window device context


11-20020
tamerlan311
2002-10-27 16:31
2003.07.07
рабочая область экрана


1-20033
VitaL
2003-06-24 03:28
2003.07.07
Как добавить иконку в трей