Page 1 of 1

Designer Control Toolbars

Posted: Wed Dec 19, 2007 9:49 am
by Brendan
Hi,

How can I make hidden toolbars visible within the Designer control. I have an mdi application with the designer on a child form. Every time the child form is open I want to ensure the Standard Toolbar is visible, along with some other toolbars. If I hide certain toolbars I want to make sure these are visible the next time I open the child.

Thanks.

Designer Control Toolbars

Posted: Wed Dec 19, 2007 12:41 pm
by lcruiser
Add these codes to your form constructor

Code: Select all

StiService[] services = StiToolbarService.GetToolbarServices(designer);
foreach (StiToolbarService tbservice in services)
{
    if (tbservice.ToolBar != null)
        {
            tbservice.ToolBar.Visible = true;
        }
}
Hope it helps.

Designer Control Toolbars

Posted: Thu Dec 20, 2007 4:08 am
by Brendan
Thanks for that.

I tried running this code in the mdi childs form constructor but my toolbars still remain hidden.
Stepping through with the debugger even still shows Toolbar.Visible = false event after passing it a value of true.

My mdi child has an StiDesignerControl on placed on it. If I hide all toolbars the only way for me to get them back on screen seems to be by opening the designer application and re-adding them to the top, closing the designer and then using my own mdi child again.