"Thor" <thr@image.danmark> wrote in
news:ZC13a.85314$Hl6.7892706@news010.worldonline.dk:
> "Michael Vilhelmsen" <smom22.remove_this_tekst@tdcadsl.dk> wrote in
> message news:nd13a.85129$Hl6.7890536@news010.worldonline.dk...
>> Hej
>>
>> Kan man sortere indeholdet af et TMemo ?
>>
<klip>
> Sådan kan du gøre: (utestet)
>
> procedure sorterMemo(memo : tmemo);
> Var strl : tstringlist;
> begin
> strl := tstringlist.create;
> strl.text := memo.lines.text;
> strl.sorted := true;
> memo.lines.text := strl.text;
> strl.free;
> end;
>
var
strl: TStringList;
begin
strl := TStringlist.Create;
try
strl.Assign(Memo.lines);
strl.Sorted := true;
Memo.Lines.Assign(strl);
finally
strl.Free;
end;
end;
.... ikke fordi den tidligere ikke virkede, men denne er lidt kønnere
/Claus
--
Claus Christiansen, <mailto:NOSPAM@unipeople.dk>, leave the adr. as it is
personal: <
http://unipeople.dk/~cch>; pythia: <
http://www.pythia.dk>
===========================================================--------------
"Computers are useless. They can only give you answers" - Pablo Picasso