ToolStripItem visible problem
C#
2
Posts
2
Posters
0
Views
1
Watching
-
I have the following code:
#region Make all menustrip visible foreach (ToolStripMenuItem menuItem in menuStrip.Items) { menuItem.Visible = true; foreach (ToolStripItem toolStripItem in menuItem.DropDownItems) { toolStripItem.Visible = true; } } #endregion
Why can't I change the toolStripItem Visible to true? I did not catch any VisibleChanged for the toolStripItem .
Work hard, Work effectively. Stock Pick | Small Website Host
-
I have the following code:
#region Make all menustrip visible foreach (ToolStripMenuItem menuItem in menuStrip.Items) { menuItem.Visible = true; foreach (ToolStripItem toolStripItem in menuItem.DropDownItems) { toolStripItem.Visible = true; } } #endregion
Why can't I change the toolStripItem Visible to true? I did not catch any VisibleChanged for the toolStripItem .
Work hard, Work effectively. Stock Pick | Small Website Host
General suggestion for similar situation : try to trace the code,is the loop even activated? - where you call the code aren't you change the visibility after this code - check the parent's visibility more carefully - in the past I've seen some situation that VS did not recognize the changes, mostly changes by designer,...