ToolStrip keeps changing its visible property to False

  • Thread starter Thread starter Daniel Jeffrey
  • Start date Start date
D

Daniel Jeffrey

Hello,

I have no idea how this is happening.

I have a TabControl on the form, and in one of the tabs I have a ToolStrip
with a few buttons and Grid.

Every now and then I look and the ToolStrip has disappeared, when I bring it
up in the Properties Editor the Visible value is False.

If i look into the Form.Designer.cs sure enough there is Visible = false

I have and never will set this myself.

This is driving me mad, any help?

Thanks,

Daniel
 
hey its working fine . u may missed some thing .

Bob Powell said:
What version of Visual Studio are you using?

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
sorry
2005 Sp1
Dan

Bob Powell said:
What version of Visual Studio are you using?

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Code from Designer.cs


this.DatabaseTab.Controls.Add(this.DatabasesGrid);
this.DatabaseTab.Controls.Add(this.DatabaseStrip);


//
// DatabaseStrip
//
this.DatabaseStrip.AllowMerge = false;
this.DatabaseStrip.Items.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.DBSaveButton,
this.DBCancelButton,
this.toolStripSeparator1,
this.TestConnButton});
this.DatabaseStrip.Location = new System.Drawing.Point(0, 0);
this.DatabaseStrip.Name = "DatabaseStrip";
this.DatabaseStrip.Size = new System.Drawing.Size(787, 25);
this.DatabaseStrip.TabIndex = 8;
this.DatabaseStrip.Text = "toolStrip1";

This is change changes to
this.Visible = false;

I am not really sure what I could have missed.

Dan
 
Does anyone have any idea on this.

It seems to happen when the designer moves to a different tab.

The toolstrip on the tab that just lost focus seems to then set itself to
visible = false.

I have had to put code in to ensure they are all visible when the form is
created, and this should not be needed.

Daniel
 
Back
Top