Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. ToolStripItem visible problem

ToolStripItem visible problem

Scheduled Pinned Locked Moved C#
comhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yulianto
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • Y Yulianto

      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

      S Offline
      S Offline
      subai
      wrote on last edited by
      #2

      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,...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups