Jump to content
Xtreme .Net Talk

<ToolboxItem(False)> _ still shows up in toolbox


Recommended Posts

Posted

The name says it all... and I am probably doing something wrong again.

 

I am currently making a component. One of its properties should be the name of a container control or form on the app that will hold a configuration control I have made. This configuration control will then be added to the specified container by the component programmatically. This works perfectly.

 

The problem I am having is that this usercontrol in the library shows up in the toolbox and I don't want it to since it should only be added by the main componnent. I have added <ToolboxItem(False)> _ immediately before the usercontrols class declaration but that doesn't seem to work.

 

Any idea how I can get this pesky control to disappear from the toolbox?

"Programmers are tools for converting caffeine into code."

 

Madcow Inventions -- Software for the Sanity Challenged.

  • *Gurus*
Posted
Assuming the component inherits from [msdn=System.ComponentModel.Component]Component[/msdn], adding [msdn=System.ComponentModel.Design.ToolboxItemAttribute]ToolboxItem[/msdn] and [msdn=System.ComponentModel.Design.DesignTimeVisibleAttribute]DesignTimeVisible[/msdn] attributes should be more than enough. I'd shut down Visual Studio .NET and start a new project to test if they're working. The IDE is known to cache things that it shouldn't.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...