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. How do I “hide” controls that my control uses from the toolbox?

How do I “hide” controls that my control uses from the toolbox?

Scheduled Pinned Locked Moved C#
questioncsharpvisual-studiocom
3 Posts 3 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.
  • P Offline
    P Offline
    pdohara
    wrote on last edited by
    #1

    I have developed a control. Among other things this control can popup other controls at runtime. When you include the assembly in Visual Studio, the control that I created shows up, but the other controls (the ones my control uses) show up as well. I would rather not have them show up in the toolbox in Visual Studio. Is there an Attribute that I can apply to these classes to make them not show up? I found the browsable attribute, but it says it is for properties and events.

    Tanks for your support
    Pat O
    Blog

    _ _ _
    /*\== /*\== /*\==
    <ooo> <ooo> <ooo>

    N C 2 Replies Last reply
    0
    • P pdohara

      I have developed a control. Among other things this control can popup other controls at runtime. When you include the assembly in Visual Studio, the control that I created shows up, but the other controls (the ones my control uses) show up as well. I would rather not have them show up in the toolbox in Visual Studio. Is there an Attribute that I can apply to these classes to make them not show up? I found the browsable attribute, but it says it is for properties and events.

      Tanks for your support
      Pat O
      Blog

      _ _ _
      /*\== /*\== /*\==
      <ooo> <ooo> <ooo>

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Try System.ComponentModel.ToolboxItemAttribute

      [System.ComponentModel.ToolboxItem(false)]
      public class YourControl : YourBaseControl
      {
      }

      Navaneeth How to use google | Ask smart questions

      1 Reply Last reply
      0
      • P pdohara

        I have developed a control. Among other things this control can popup other controls at runtime. When you include the assembly in Visual Studio, the control that I created shows up, but the other controls (the ones my control uses) show up as well. I would rather not have them show up in the toolbox in Visual Studio. Is there an Attribute that I can apply to these classes to make them not show up? I found the browsable attribute, but it says it is for properties and events.

        Tanks for your support
        Pat O
        Blog

        _ _ _
        /*\== /*\== /*\==
        <ooo> <ooo> <ooo>

        C Offline
        C Offline
        carlecomm
        wrote on last edited by
        #3

        Hi, when the control Init , try to set "control.visible = false ";

        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