Text im RichEdit mehrfarbig und / oder Formatiert ausgeben.
Delphi-Quellcode:
RichEdit1.SelAttributes.Color := clRed;
RichEdit1.SelText := 'Text rot';
RichEdit1.ClearSelection;
RichEdit1.SelAttributes.Color := clBlue;
RichEdit1.SelText := 'Text blau';
RichEdit1.ClearSelection;
RichEdit1.SelAttributes.Color := clBlack;
RichEdit1.SelText := 'Text schwarz';
RichEdit1.ClearSelection;
RichEdit1.Lines.Append('');
RichEdit1.SelAttributes.Color := clGreen;
RichEdit1.SelAttributes.Style := [fsBold];
RichEdit1.SelText := 'Text FETT';
RichEdit1.ClearSelection;
RichEdit1.SelAttributes.Color := clMaroon;
RichEdit1.SelAttributes.Style := [fsUnderline];
RichEdit1.SelText := 'ENDE';
RichEdit1.ClearSelection;
RichEdit1.Lines.Append('');