ToolStrips in TabPages often disappear from Windows Forms Designer

I have a Windows Form application with TabControl. One of the TabPages in the TabControl contains a ToolStrip. Often, a Windows Form developer spontaneously sets the Visible Toolstrip property to False. In order for the tool to reappear in my form, I need to manually find the control and return the True property. This is really annoying.

Does anyone know why this is happening, or how to stop it? I tried to set the minimum height of the control to a non-zero value, but this does not affect.

I use VS2008, VB.NET and .Net framework 2.0, however I also struggled with this problem in VS2005 in several different applications.

+4
source share
2 answers

Perhaps I found a workaround for this.

My ToolStrip was placed directly on the TabPage tab attached to the top. However, I found a thread in Microsoft Connect that described the same problem when ToolStrip was in ToolStripContainer on TabPage. This issue was noted in the VS2005 release candidate, but was allegedly fixed by Microsoft in September 2006.

So I changed my code to put the ToolStrip inside the ToolStripContainer, and now I can not reproduce the problem.

+5
source

Open the constructor code and explicitly set the visibility property of the control to true.

Nick Hanshaw

0
source

Source: https://habr.com/ru/post/1276650/


All Articles