views:

108

answers:

2

I have created a component and it is automatically shown in toolbox when I open the solution. It can be placed on form, I can change properties etc.

When I close the solution and install it in toolbox (choose toolbox item menu), I want this component to be shown in a different group (other than "All Windows Forms" group). How can I do it?

EDIT: I want my components to be shown in a custom group such as "My Components".

+1  A: 

You can simply drag it to the desired group by using the mouse. If you want to add a new group, right click the toolbox window and select "Add Tab".

Konamiman
Sorry for not being clear but I want my controls to show in a new group (e.g. "My Components"). Any way to do that?
Hemant
I have just updated the answer.
Konamiman
Is there any way to ensure that controls automatically show-up in new group (not relying on library user to do that)?
Hemant
None that I know about. However this can be useful: http://msdn.microsoft.com/en-us/library/system.componentmodel.toolboxitemattribute.aspx
Konamiman
So, was my answer helpful?
Konamiman
I did try that attribute but didn't work. Perhaps the group is **not** managed by assembly but the IDE itself.
Hemant
+1  A: 

If you want to install the finished component, you can copy the assembly to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies and then use the context menu of the component palette to add a new group and insert the component into that group.

If you want to create a "setup" that does that automatically if you distribute the component, there's a tool called Visual Studio Toolbox Manager that you can use to install the component on any development machine without the manual copy process described above.

Not sure if that is what you're looking for, however...

Thorsten Dittmar
That **is** the answer I was looking for. Thanks a lot.
Hemant