Главная страница
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.013 c
14-20190
Knight
2003-06-17 16:07
2003.07.07
Download для вебстраниц...


6-20180
vlgrig1961
2003-04-30 14:36
2003.07.07
Вопрос про Win2k Server и WinNT4 server


1-20136
Ahmad K
2003-06-24 19:25
2003.07.07
ShellExecute(handle, open , http://www.de.ru , nil, nil, SW_????


1-20081
Smashich
2003-06-24 11:30
2003.07.07
Events And Word


3-19972
alecs
2003-06-11 19:07
2003.07.07
Как защитить данные в базе InterBase?