Модуль "Сообщения" (часть 14) - spSkinListView1ColumnClick

Рубрика: Исходники
Среда, 21 апреля 2010 г.
Просмотров: 110
последняя версия: 3.0.9 build 961 beta
от 07 декабря 2007 г.
procedure TfrmAT_Messages.spSkinListView1ColumnClick(Sender: TObject;
  Column: TListColumn);
var
  i: integer;
begin
  LvSortStyle := cssAlphaNum;
  { determine the sort style }
   if (Column.Index = 2) or (Column.Index = 1)  then
     LvSortStyle := cssDateTime;
   if Column.Index = 4 then
     LvSortStyle := cssNumeric;
   { Call the CustomSort method }
   //spSkinListView1.CustomSort(@CustomSortProc_AT_Messages, Column.Index -1);
   spSkinListView1.CustomSort(@CustomSortProc, Column.Index -1);
   { Set the sort order for the column}
   LvSortOrder[Column.Index] := not LvSortOrder[Column.Index];
   // set column image
   for i:= 0 to spSkinListView1.Columns.Count-1 do spSkinListView1.Column[i].ImageIndex:= -1;
   if LvSortOrder[Column.Index]
   then
     spSkinListView1.Column[Column.Index].ImageIndex:= 12
   else
     spSkinListView1.Column[Column.Index].ImageIndex:= 13;
end;
Rambler's Top100