Disable functionality in the designer and preview

dannidanni Denmark
edited 2:03AM in FastReport .NET
Hi, i have some functionality I want to disable in the designer.

I want to remove the following if possible?

The main menu
Data-> "Add data source"
View->Options -> Plugins
File-> Select Language
Help

The "data" Dock window
- Actions
- mouse rightclick Contextmenus
- New data source


In the Preview Control I want to disable the following
the button "Send by Email"
the "Open" button

Thank you



Comments

  • edited 2:03AM
    Hello,

    1,2) wait for the next build and you will able to do this:
    Config.DesignerSettings.DesignerLoaded += new EventHandler(DesignerSettings_DesignerLoaded);
    Config.DesignerSettings.Restrictions.DontEditData = true;
    
    void DesignerSettings_DesignerLoaded(object sender, EventArgs e)
    {
      (sender as DesignerControl).MainMenu.miFileSelectLanguage.Visible = false;
    }
    

    3) Set Config.PreviewSettings.Buttons to set of buttons you wish to see.
  • dannidanni Denmark
    edited 2:03AM
    That sounds perfect. I will wait for the next build with 1) and 2).

    Thank you very much.
  • edited 2:03AM
    The build is ready, you can download it now.
  • edited 2:03AM
    perfect!
    before this

    FastReport.Design.StandardDesigner.DesignerMenu mMenu = fmDesignerCtl.Plugins.FindType("FastReport.Design.StandardDesigner.DesignerMenu") as FastReport.Design.StandardDesigner.DesignerMenu;
    if (mMenu == null)
    {
    mMenu = fmDesignerCtl.Plugins.Find("MainMenu") as FastReport.Design.StandardDesigner.DesignerMenu;
    }
    if (mMenu != null)
    {
    mMenu.miFileSaveAs.Visible = false;
    }

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.