procedure TForm1.Button1Click(Sender: TObject);
var
i,j,li_maxlength:integer;
s_array:array[1..10] of string;
begin
li_maxlength:=length(memo1.Lines[0]);
for i:=1 to memo1.Lines.Count-1 do
begin
if li_maxlength<length(memo1.Lines) then
li_maxlength:=length(memo1.Lines);
end;
for j:=1 to li_maxlength do
begin
s_array[j]:='';
for i:=1 to memo1.Lines.Count do
begin
if length(memo1.Lines[i-1])>=j then
s_array[j]:=s_array[j]+copy(memo1.Lines[i-1],j,1)
else
s_array[j]:=s_array[j]+' ';
end;
end;
memo1.Clear;
//memo1.Font.Style:=
for i:=1 to li_maxlength do
memo1.Lines.Add(s_array);
end;