[Lazarus] Sorting StringGrid by column click
Juha (gmail)
juha.manninen62 at gmail.com
Sat May 14 00:05:31 CEST 2011
Jesus Reyes kirjoitti perjantai, 13. toukokuuta 2011 21:45:30:
> > > Which way is better? I think the Descending-sort code
> > is always identical:
> > > if SortOrder=soDescending then
> > > result:=-result;
> > > and it could be better if users don't need to worry about it.
> >
> > Of course.
>
> I think if the user don't need to worry then the built-in string ascending
> sorting should be fine, in all other cases, i.e. custom sorting, the user
> needs to take care of doing it correctly, that includes planing the sort
> order.
Things have changed a little because now clicking the same column many times
changes sorting between ascending and descending.
Thus the custom sort code should take it into account (when ColumnClickSorts
is enabled).
Juha
More information about the Lazarus
mailing list