postavi novu promenljivu nSortCol kao integer
a onda onColumnClick dogadjaj dodaj:
Code:
nSortCol := Column.Index;
Iteml.AlphaSort;
a onda on COmpareItem dogadjaj dodaj
Code:
if nSortCol = 0 then
Compare := CompareStr (Item1.Caption, Item2.Caption)
else
Compare := CompareStr (Item1.SubItems [nSortCol - 1],
Item2.SubItems [nSortCol - 1]);
Source code from mastering delphi 5
by samadhi
Let there be Pascal and God made Lazarus and blessed Linux