Style

edited 2:23PM in FastReport .NET
Hi,
how can I assign via code styles that I created with style editor?

Thanks

Comments

  • edited 2:23PM
    Hello,

    You have to add a Style to the report.Styles collection, then assign the style name to the report object's Style property:
    // create a new style
    Style style = new Style();
    style.Name = "MyStyle";
    style.Fill = new SolidFill(Color.Red);
    
    // add it to report styles
    report.Styles.Add(style);
    
    // apply a style to the Text object
    (report.FindObject("Text1") as TextObject).Style = "MyStyle";
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.