如何在富编辑(Delphi)中左/右对齐线?

时间:2017-03-08 13:48:43

标签: delphi richedit

我有没有办法在package com.service.spel; import org.springframework.stereotype.Component; @Component(value="accessBean") public class AccessCheckBean { public String getPermision(){ /** * return the api permision */ String scope = "#oauth2.hasScope('resource.Update')"; return scope; } } 组件中左右对齐线?

澄清

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

1 个答案:

答案 0 :(得分:2)

正如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');