Is there a way I can align the line left or right in the TRichEdit
component?
I wish to align only a portion of the text, not all of it.
As Sertac mentioned in a comment, you use the TRichEdit.Paragraph.Alignment
.
RichEdit1.Paragraph.Alignment := taLeftJustify;
RichEdit1.Lines.Add('This line is left justified.');
RichEdit1.Paragraph.Alignment := taCenterJustify;
RichEdit1.Lines.Add('This line is centered.');
RichEdit1.Paragraph.Alignment := taRightJustify;
RichEdit1.Lines.Add('This line is right justified');