Tag Archives: disable

Disable a toolbar or ToolStripPanel

Individual toolbars / toolstrips can be disabled by using the enabled property.

When in a ToolStrip in inside a ToolStripContainer the entire panel (and the hosted toolstrips) can be disabled all at once.

For example
toolStripContainer1.TopToolStripPanel.Enabled = false;
toolStripContainer1.BottomToolStripPanel.Enabled = false;
toolStripContainer1.LeftToolStripPanel.Enabled = false;
toolStripContainer1.RightToolStripPanel.Enabled = false;

Note:
Do not disable the toolStripContainer1 since it will also disable the hosted panel in the center.

Lastest update in May 2011, inital post in May 2011