views:

1719

answers:

3

This is in reference to my other question Auto Clearing Textbox. If I choose to derive a new TextBox control from TextBox instead of implement a user control just containing my Textbox, how would I include that in the toolbox.

A: 

Right-click the toolbox, click "Choose Items" from the context menu, browse to your DLL, and select it.

Greg Hurlman
+4  A: 

Right-click the toolbox, click "Choose Items" from the context menu, browse to your DLL, and select it.

To extend on Greg's answer... Just to clarify, you cannot add a user control to the tool box if the code for it is in the same project that you want to use it in. For some reason MS has never added this ability, which would make sense since we don't want to always have to create a User Control Library DLL everytime we want to use a user control. So, to get it in your tool box, you have to first create a separate "User Control Library" project (which can be in the same solution!) and then do what Greg said.

Adam Haile
A: 

Thanks Adam.

That is that part I was missing because I am just using a little test app to try this out on. I usually stick all of my user controls in one library and reference that when ever I need it, but I was just trying this out using a derived control for the first time and couldn't figure out why I couldn't see it.

Robin Robinson