【问题标题】:Fast reports - bulleted text快速报告 - 项目符号文本
【发布时间】:2013-11-22 00:23:15
【问题描述】:

有没有办法可以在快速报告 4.13 中添加 tekst?我有一个备忘录字段,我想用项目符号显示。如果不在快速报告中,还有其他可以做到这一点的 delphi 组件吗?

【问题讨论】:

    标签: delphi fastreport


    【解决方案1】:

    RichText 对象 (TfrxRichView) 支持项目符号文本。

    可能自然会提出的问题是如何从代码中创建项目符号列表。嗯,这很容易。您只需将TfrxRichView 对象的内部RichEdit 的当前ParagraphNumbering 属性设置为nsBullet。假设您有一个名为 Rich1RichText 对象放在报告 frxReport1 上,您可以使用这样的代码来制作三个项目符号:

    uses
      frxClass, frxRich, frxRichEdit;
    
    procedure TForm2.Button1Click(Sender: TObject);
    var
      Component: TfrxComponent;
    begin
      Component := frxReport1.FindObject('Rich1');
      if Component is TfrxRichView then
      begin
        TfrxRichView(Component).RichEdit.Clear;
        TfrxRichView(Component).RichEdit.Paragraph.Numbering := nsBullet;
    
        TfrxRichView(Component).RichEdit.Lines.Add('Item 1');
        TfrxRichView(Component).RichEdit.Lines.Add('Item 2');
        TfrxRichView(Component).RichEdit.Lines.Add('Item 3');
    
        frxReport1.ShowReport;
      end;
    end;
    

    【讨论】:

    • 你是生命的救星——谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多