Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Can you hide an item in the component tray at design time
 

Can you hide an item in the component tray at design time

Hello,

We have a custom collection which is based on component. Everything is working fine except that the component tray gets cluttered up with custom components which don't need to be referenced indiviually. Is there any way to hide them similarly, at least in concept, to applying a Browsable(False) attribute to a property? Thanks in advance for any ideas and/or suggestions!

j2associates  Friday, May 19, 2006 9:30 PM

Hi,

You can add the [DesignTimeVisible(false)] attribute to your class.

Note that this also means that your component won't show up in the toolbox. I am not aware of any way to make it appear in the toolbox but not in the component tray.

Hope this help!

Martin

Martin Thorsen - MSFT  Saturday, May 20, 2006 1:04 AM

Hi,

You can add the [DesignTimeVisible(false)] attribute to your class.

Note that this also means that your component won't show up in the toolbox. I am not aware of any way to make it appear in the toolbox but not in the component tray.

Hope this help!

Martin

Martin Thorsen - MSFT  Saturday, May 20, 2006 1:04 AM
Thank you very much Martin! That is exactly what I needed!
j2associates  Saturday, May 20, 2006 1:16 PM

You can use google to search for other answers

Custom Search

More Threads

• Auto Format
• IPersistComponentSettings
• CollectionEditor - Code Generation for Property Controls failed. Error was: Object reference not set to an instance of an object.
• ComboBox with DropDown style does not show initial value
• Styling in WinForm Applications?
• jscript.net
• Accessing Design-Time Only Properties
• Copy Paste Control
• data source property in smart tag
• Longhorn style Breadcrumb Bar