procedure SortLines(Ascending: Boolean; CaseSensitive: Boolean; FromLine: integer = 0; ToLine: integer = -1; LogXPos: integer = 0);
Ascending - specifies sort order;
CaseSensitive - specifies whether string comparing is case sensitive;
FromLine - specifies index of first line;
ToLine - specifies index of the last sorted line. When it is equal to -1, last line of text is used.
LogXPos - specifies logical X position which is used to get strings for sorting. It is used when sort lines is applyed to columnar selection. In this case lines are sorted by selection column.