Disable functionality in the designer and preview

dannidanni Denmark
edited 3:54AM 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 3:54AM
    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 3:54AM
    That sounds perfect. I will wait for the next build with 1) and 2).

    Thank you very much.
  • edited 3:54AM
    The build is ready, you can download it now.
  • edited 3:54AM
    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