Hide CodeTabVisible in stiDesignerControl

Stimulsoft Reports.NET discussion
Post Reply
Huangfu
Posts: 3
Joined: Wed May 21, 2008 3:36 am

Hide CodeTabVisible in stiDesignerControl

Post by Huangfu »

Hello Support,

I have a StiDesignerControl on my windows form, how can I hide CodeTabVisible, HtmlPreviewReportVisible and the StiMessagesPanelService from the end user ?
Thank you.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Hide CodeTabVisible in stiDesignerControl

Post by Brendan »

To Hide the Code Tab and HTML Preview Tab you can use the following two static properties

Code: Select all

StiOptions.Designer.CodeTabVisible = false;
StiOptions.Designer.HtmlPreviewReportVisible = false;

To Disable the Message Panel you can use the following (where stiDesignerControl1 is your StiDesignerControl)

Code: Select all

Stimulsoft.Report.Design.Panels.StiMessagesPanelService msgPanel = 
        Stimulsoft.Report.Design.Panels.StiMessagesPanelService.GetService(stiDesignerControl1);

if (msgPanel != null)
{
    msgPanel.ServiceEnabled = false;
}
Huangfu
Posts: 3
Joined: Wed May 21, 2008 3:36 am

Hide CodeTabVisible in stiDesignerControl

Post by Huangfu »

Thanks for your response. I’ve done that, but they are still there. Any ideal ?
Thanks.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Hide CodeTabVisible in stiDesignerControl

Post by Vital »

Hello,

We will check this behavior and let you know about possible patch in this topic.

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Hide CodeTabVisible in stiDesignerControl

Post by Edward »

Hello, Huangfu.

Please use the following code if you want to close the Messages Window. Please run this code after designer has been created.

Code: Select all

StiMainMenuService mainMenuService = StiMainMenuService.GetService(stiDesignerControl1);
Stimulsoft.Report.Design.Panels.StiMessagesPanelService messagesPanelService = Stimulsoft.Report.Design.Panels.StiMessagesPanelService.GetService(stiDesignerControl1);
((Stimulsoft.Controls.StiDockingPanel)messagesPanelService.DockingControl.Parent).DoClose(messagesPanelService.DockingControl);
stiDesignerControl1.Refresh();
And as Brendan suggested, please run that code:

Code: Select all

StiOptions.Designer.CodeTabVisible = false;
StiOptions.Designer.HtmlPreviewReportVisible = false;
in a very beginning of your Application, e.g. in Program.cs, when none of Stimulsoft Reports.Net components had been created.

Thank you.
Post Reply