Fast reports - bulleted text

拜拜、爱过 提交于 2019-12-12 00:45:43

问题


Is there a way you can have bulleted tekst in fast reports 4.13 ? I have a memo field which I would like to display bulleted. If not in fast reports are there any other delphi components that can do that ?


回答1:


The RichText object (TfrxRichView) supports bulleted text.

The question which may naturally raise up, is how to make that bulleted list from code. Well, that's quite easy. You just set the Numbering property of the current Paragraph for the inner RichEdit of the TfrxRichView object to nsBullet. Assuming you have a RichText object named Rich1 placed on a report frxReport1, you can use a code like this to make three bulleted items:

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;


来源:https://stackoverflow.com/questions/20125806/fast-reports-bulleted-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!