Hola,
Yo utilizo estas tres funciones para insertar espacios en un texto
Código:
{Espacios por la derecha}
function Padr(cString:string;nLen:integer):string;
begin
if (Length(cString) <> nLen) then
if Length(cString) > nLen then
Result:= Copy(cString,1,nLen)
else
Result:=cString+space(nLen-Length(cString))
else
Result:= cString;
end;
{Espacios por la izquierda}
function Padl(cString:string;nLen:integer):string;
begin
if (Length(cString) <> nLen) then
if Length(cString) > nLen then
Result:= Copy(cString,1,nLen)
else
Result:=space(nLen-Length(cString)) + cString
else
Result:= cString;
end;
{Generador de espacios}
function Space(nLen:integer):string;
begin
result:=replicate(' ',nLen);
end;
Saludos