<p style="padding:0 0 0 0; margin:0 0 0 0;">No, it isn't a bug.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">In sources, you can see comment:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">function AlphaSort: Boolean; // always sorts column 0 in sdAscending order</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">So if you want other sorting, you must set three sort-related properties:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">ListView1.SortColumn:=1;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">ListView1.SortDirection:=sdAscending;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">ListView1.SortType:=stText;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">It works, I just tested in Qt.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: "Valdas Jankūnas" <zmuogs@gmail.com><br />
> Komu: General mailing list <lazarus@lazarus.freepascal.org><br />
> Datum: 14.04.2015 13:53<br />
> Předmět: [Lazarus] Strange Alphasort in ListView<br />
></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">Hello,<br />
<br />
when I execute ListView.AlphaSort then ListView always sorts first <br />
column with default sort order. Also it resets SortColumn property to <br />
zero and SortOrder to default (see attached screenshot: before and after <br />
execution of Alphasort).<br />
<br />
Why it not sorts current SortColumn with current SortOrder? Is this a Bug?<br />
<br />
Tried in Qt, Gtk2 and Win widgetsets - same strange result.<br />
<br />
<br />
-- <br />
Valdas Jankūnas<br />
<br />
<br />
----------<br />
<br />
--<br />
_______________________________________________<br />
Lazarus mailing list<br />
Lazarus@lists.lazarus.freepascal.org<br />
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a></p>