Cita:
Empezado por Casimiro Notevi
¿Y esos caracteres de control no están en el .Text?, ¿dónde están?
Es por curiosidad.
|
Son parte del texto, pero son los que "embellecen" el RichEdit. Por ejemplo, yo tengo éste procedimiento...
Código Delphi
[-]procedure Tform.FormateaTextoRTF(sTexto1,sTexto2: string;iTipo: Integer;Destino:TwwDBRichEdit);
begin
with Destino do
begin
SelStart := GetTextLen;
case iTipo of
0 : begin
SelAttributes.Size := 12;
SelAttributes.Style := [fsBold];
SelAttributes.Color := clNavy;
end;
1 : begin
SelAttributes.Size := 10;
SelAttributes.Style := [fsBold];
SelAttributes.Color := clNavy;
end;
2 : begin
SelAttributes.Size := 9;
SelAttributes.Style := [fsBold];
SelAttributes.Color := clWindowText;
end;
3 : begin
SelAttributes.Size := 8;
SelAttributes.Style := [fsBold];
SelAttributes.Color := clWindowText;
end;
end;
SelText := sTexto1;
SelAttributes.Size := 8;
SelAttributes.Style := [];
SelAttributes.Color := clWindowText;
if Trim(sTexto2) > '' then
SelText := sTexto2;
SelText := CRLF;
end;
end;
Si te das cuenta, primero le da formato al texto Y DESPUÉS lo escribe. Éstos caracteres de control son los que no alcanza a copiar el .Text de un RichEdit a otro...