[Lazarus] Strange Alphasort in ListView

Vojtěch Čihák vojtech.cihak at atlas.cz
Tue Apr 14 14:34:41 CEST 2015


No, it isn't a bug.
 
In sources, you can see comment:
 
function AlphaSort: Boolean; // always sorts column 0 in sdAscending order
 
So if you want other sorting, you must set three sort-related properties:
 
ListView1.SortColumn:=1;
ListView1.SortDirection:=sdAscending;
ListView1.SortType:=stText;
 
It works, I just tested in Qt.
 
V.
______________________________________________________________
> Od: "Valdas Jankūnas" <zmuogs at gmail.com>
> Komu: General mailing list <lazarus at lazarus.freepascal.org>
> Datum: 14.04.2015 13:53
> Předmět: [Lazarus] Strange Alphasort in ListView
>
Hello,

when I execute ListView.AlphaSort then ListView always sorts first 
column with default sort order. Also it resets SortColumn property to 
zero and SortOrder to default (see attached screenshot: before and after 
execution of Alphasort).

  Why it not sorts current SortColumn with current SortOrder? Is this a Bug?

  Tried in Qt, Gtk2 and Win widgetsets - same strange result.


-- 
   Valdas Jankūnas


----------

--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus <http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150414/4c04df75/attachment-0003.html>


More information about the Lazarus mailing list