views:

1195

answers:

3

I have a Windows Form app with a TabControl. One of the TabPages in the TabControl contains a ToolStrip. Frequently, the Windows Form designer will spontaneously set the Visible property of the Toolstrip to False. To get the toolstrip to reappear in my form, I have to manually find the control and set the property back to True. It's really annoying.

Does anyone know why this happens, or how to stop it? I've tried setting the minimum height of the control to a non-zero value, but that has no effect.

I'm using VS2008, VB.NET and the .Net framework 2.0, however I've struggled with this problem in VS2005 too, in several different applications.

A: 

It is a really bugging problem. Then I found this tip using Document Outline.. Does not solve the actual problem but makes things a lot easier.

Gulzar
+1  A: 

I may have found a workaround for this.

My ToolStrip was placed directly on the TabPage, docked to Top. However, I found a thread on Microsoft Connect that described the same problem when the ToolStrip was in a ToolStripContainer on the TabPage. That problem was observed in a release candidate of VS2005, but supposedly fixed by Microsoft in September 2006.

As such, I changed my code to put the ToolStrip inside a ToolStripContainer, and now I am unable to reproduce the problem.

Phillip Wells
A: 

Open the designer code and explicitly set the control's visible property to true.

Nick Hanshaw