Custom Control not appearing in Toolbox

J

JTC^..^

When I create a custom control inside my Windows Application project
it does not appear in the toolbox. I'm using Visual Studio 2005 (Team
System for Developers), so this should appear automatically, right?

I've compiled the application and selected show all items, but the
controls do not appear.

If I create an external Windows Control library and import the
controls they appear. I also tried resetting the toolbox, then
creating a new control. As the behaviour of resetting the toolbox is
to remove custom controls, could this now be my problem? Either way,
is there a setting or something I'm missing so Visual Studio will show
the controls automatically?

Thanks
 
P

Peter Duniho

When I create a custom control inside my Windows Application project
it does not appear in the toolbox. I'm using Visual Studio 2005 (Team
System for Developers), so this should appear automatically, right?

Yes. Assuming the control is properly referenced, either by being an
imported library or by being part of a project within the solution itself,
it should show up in the Toolbox.

I don't know off-hand what the problem might be. I suspect there's some
sort of error in the implementation of the control. One way to test that
would be to build the exact control as a library, and import it into a
completely different solution's project and see if it shows up there. I
would guess that it won't.

If it doesn't, then you need to figure out what's wrong with the control
implementation. You may want to post a _concise_ but complete sample of
code that reproduces the problem, since otherwise it's not really possible
for anyone to comment specifically on what's wrong.

If the control does show up when imported into a different solution, then
I really don't know. It seems likely that that means there's something
about the solution in which it's contained that is somehow suppressing it,
but what that could be I have no idea.

Another test you might do is to create a brand new empty solution, and add
a new Custom Control class to the solution, to see if it shows up in the
toolbox. That way you know for sure there's nothing that you might have
added to the class that would cause a problem. If it doesn't show up in
that scenario, there's definitely something odd going on with VS. If it
does show up in that scenario, that's further support for the theory that
you've got something particularly wrong in the custom control that's not
showing up, probably related to code you added yourself.

Finally, I suppose it's possible that there's some user setting that
inhibits controls from showing up in the Toolbox, but what that might be I
don't know, and it seems odd that it would apply only to a control from
within the same solution.

Pete
 
A

allan christainson

To use a custom control from the Toolbox I had to select a category (general) and right click. This brought up a menu where I selected "Choose Items...". From there I browsed to the DLL where my control was found.



JTC^..^ wrote:

Custom Control not appearing in Toolbox
29-Dec-07

When I create a custom control inside my Windows Application projec
it does not appear in the toolbox. I'm using Visual Studio 2005 (Tea
System for Developers), so this should appear automatically, right

I've compiled the application and selected show all items, but th
controls do not appear

If I create an external Windows Control library and import th
controls they appear. I also tried resetting the toolbox, the
creating a new control. As the behaviour of resetting the toolbox i
to remove custom controls, could this now be my problem? Either way
is there a setting or something I'm missing so Visual Studio will sho
the controls automatically

Thanks

Previous Posts In This Thread:

Re: Custom Control not appearing in Toolbox

Yes. Assuming the control is properly referenced, either by being an
imported library or by being part of a project within the solution itself,
it should show up in the Toolbox

I don't know off-hand what the problem might be. I suspect there's some
sort of error in the implementation of the control. One way to test that
would be to build the exact control as a library, and import it into a
completely different solution's project and see if it shows up there. I
would guess that it won't

If it doesn't, then you need to figure out what's wrong with the control
implementation. You may want to post a _concise_ but complete sample of
code that reproduces the problem, since otherwise it's not really possible
for anyone to comment specifically on what's wrong

If the control does show up when imported into a different solution, then
I really don't know. It seems likely that that means there's something
about the solution in which it's contained that is somehow suppressing it,
but what that could be I have no idea

Another test you might do is to create a brand new empty solution, and add
a new Custom Control class to the solution, to see if it shows up in the
toolbox. That way you know for sure there's nothing that you might have
added to the class that would cause a problem. If it doesn't show up in
that scenario, there's definitely something odd going on with VS. If it
does show up in that scenario, that's further support for the theory that
you've got something particularly wrong in the custom control that's not
showing up, probably related to code you added yourself

Finally, I suppose it's possible that there's some user setting that
inhibits controls from showing up in the Toolbox, but what that might be I
don't know, and it seems odd that it would apply only to a control from
within the same solution

Pete

Custom Control not appearing in Toolbox
When I create a custom control inside my Windows Application projec
it does not appear in the toolbox. I'm using Visual Studio 2005 (Tea
System for Developers), so this should appear automatically, right

I've compiled the application and selected show all items, but th
controls do not appear

If I create an external Windows Control library and import th
controls they appear. I also tried resetting the toolbox, the
creating a new control. As the behaviour of resetting the toolbox i
to remove custom controls, could this now be my problem? Either way
is there a setting or something I'm missing so Visual Studio will sho
the controls automatically

Thanks


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF TreeView Control With Filtering of Nodes Based on Their Levels
http://www.eggheadcafe.com/tutorial...a-bf26b9783a9b/wpf-treeview-control-with.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top