hi, könntest es, wenn ich dich richtig verstanden habe, zum Beispiel so machen.
Code:
procedure TMainForm.ButtonCClick(Sender: TObject);
var
l1,l2,l3 : Integer;
s1,s2,s3 : String;
const
c1 : TColor = clRed;
c2 : TColor = clGreen;
c3 : TColor = clBlue;
begin
RichEdit.Lines.Clear;
s1 := Edit1.Text;
s2 := Edit2.Text;
s3 := Edit3.Text;
l1 := length(s1);
l2 := length(s2);
l3 := length(s3);
RichEdit.Text := s1+s2+s3;
RichEdit.SelStart := 0;
RichEdit.SelLength := l1;
RichEdit.SelAttributes.Color := c1;
RichEdit.SelStart := l1;
RichEdit.SelLength := l2;
RichEdit.SelAttributes.Color := c2;
RichEdit.SelStart := l1+l2;
RichEdit.SelLength := l3;
RichEdit.SelAttributes.Color := c3;
end;
Mirilin