簡體   English   中英

如何在富編輯(Delphi)中左/右對齊行?

[英]How to left/right align lines in rich edit (Delphi)?

有沒有辦法可以在TRichEdit組件中向左或向右對齊行?

澄清

我希望只對齊文本的一部分,而不是全部。

正如 Sertac 在評論中提到的,您使用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');

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM