|
-
Sep 12th, 2011, 09:49 AM
#1
Custom controls not showing up in toolbox
Hey,
I have a solution with about 5 projects, the main (startup) project is a windows forms project while the others are control libraries that contain some custom controls. The main winforms project however also contains some custom controls.
Recently, the controls in the main winforms project have stopped appearing in my toolbox. The controls from the other control library projects appear just fine, but none of the controls in my main project will show...
Some of the projects are VB, some are C#.
I have tried everything I know to fix it:
- Delete bin/debug folders and restart
- Build, build, build, build, and build
- Target the same .NET Framework version and CPU platform in all projects
- Build again
Nothing works...
All projects target .NET Framework 4.0 and compile for the x86 platform (since I am using Access db). All projects build successfully, no errors. I can run the solution just fine. I can even declare and add the controls in code and they work just fine. They just don't show up in the toolbox so I can't drag them to my form and I have to dig into the designer code everytime, which is really annoying!
Any idea what could cause this beside what I've already tried??
-
Sep 12th, 2011, 12:00 PM
#2
Re: Custom controls not showing up in toolbox
Couple of things to try:
Tools -> Options -> Windows Forms Designer -> General : AutoToolboxPopulate
(not got 2010 to try that tho)
And there is a show all context option on the toolbar as well which sometimes hides things.
Also heard of having a space in a project name might cause this, but that was a google result.
-
Sep 12th, 2011, 12:11 PM
#3
Re: Custom controls not showing up in toolbox
Thanks, but no luck. The AutoToolboxPopulate setting was already True. The Show All option in the context menu of the toolbox simply shows the categories that aren't relevant for the current project (such as WPF and ASP.NET controls), turning it on does not show the controls in the current project either...
I now tried everything I could think of including unloading/reloading the projects in every order, nothing helps...
I have half a mind to start a new solution and add the files back manually, but it might happen again and I don't feel like doing this all the time :S
One final detail I forgot to mention is that the project files are on a Dropbox folder (so I can access them from my laptop as well). I don't see how that should affect it though, in the end the Dropbox folder is just any ordinary folder, except there's some application monitoring its changes and uploading them, right?
-
Sep 12th, 2011, 01:09 PM
#4
Re: Custom controls not showing up in toolbox
I have had this happen before in an older version of the framework (mainly with inherited controls though - usercontrols allways seemed to get added). I remember trying alot of things, which you ofc have already been through. But just to be on the safe side: right-click on toolbox and 'Reset Toolbox' or 'Choose items' may solve the problem.
I remember once actually having to add the control through code. And iirc that made the framework 'detect' it and add it to the toolbox (oh just reread the OP and you have tried this to no avail - so I guess this post is just a placeholder )
Neither are solutions though for several DLLs with multiple controls.
In truth, a mature man who uses hair-oil, unless medicinally , that man has probably got a quoggy spot in him somewhere. As a general rule, he can't amount to much in his totality. (Melville: Moby Dick)
-
Sep 12th, 2011, 01:31 PM
#5
Re: Custom controls not showing up in toolbox
The problem is not having several DLLs (actually, several projects, during design-time I think that's something different?) because the controls from the other projects are all there. Just the main (startup) project isn't. Not for UserControls, inherited controls, nothing.
I'll try Reset Toolbox later. Is there an option to make a backup of it in case it doesn't work, because I have a few custom categories that I'd like to keep...
Last option I can try is Choose Items and selecting the executable, but that shouldn't be necessary...
-
Sep 14th, 2011, 02:34 AM
#6
New Member
Re: Custom controls not showing up in toolbox
Have you tried to place this on top of your class?
<ToolboxItem(True)> _
Public Class MyControl
Inherits Control
End Class
This is my first post. Just a trial.
-
Sep 14th, 2011, 02:41 AM
#7
Addicted Member
Re: Custom controls not showing up in toolbox
i already faced like this ......
please delete all compiled lib from "bin>Debug" and also delete from "obj\x86\Debug" then rebuild....
-
Sep 14th, 2011, 02:50 AM
#8
Re: Custom controls not showing up in toolbox
 Originally Posted by medsont
i already faced like this ......
please delete all compiled lib from "bin>Debug" and also delete from "obj\x86\Debug" then rebuild....
Read my first post again... That's the first thing I tried.
In the mean time I tried Choose Items and browsed to the compiled executable. That worked a bit... It added about half my controls, the other half is still missing :s
I checked the missing controls for errors but there aren't any, I'm not doing anything strange with custom designers or anything, its just a class that inherits Label and draws a gradient background ...
-
Sep 14th, 2011, 03:28 AM
#9
Addicted Member
Re: Custom controls not showing up in toolbox
yes i already read it Thissen but you r mention about "bin>Debug" folder not about "obj\x86\Debug" so post it.......
both folders are different purposes .......
http://www.velocityreviews.com/forum...eferences.html
-
Sep 14th, 2011, 03:48 AM
#10
Addicted Member
Re: Custom controls not showing up in toolbox
Nick i got this point from my previous post ........["if you build a 2nd time, it doesn't rebuild the entire
project and can reuse some of the stuff from the first time in obj to make the build faster"]
-
Sep 14th, 2011, 04:16 AM
#11
Re: Custom controls not showing up in toolbox
Sorry, I wrote bin/debug but I meant bin/obj. I always remove the entire bin and obj folders
-
Sep 14th, 2011, 07:29 PM
#12
New Member
Re: Custom controls not showing up in toolbox
Nick have you tried to place this on top of your custom control?
<ToolboxItem(True)> _
Public Class MyControl: Inherits Label
End Class
-
Sep 15th, 2011, 02:12 AM
#13
Re: Custom controls not showing up in toolbox
That attribute is true by default so that shouldn't matter... I can try it tomorrow but I'm certain it won't help.
-
Jan 30th, 2012, 03:15 PM
#14
Member
Re: Custom controls not showing up in toolbox
Was this issue ever resolved?
-
Jan 30th, 2012, 03:23 PM
#15
Re: Custom controls not showing up in toolbox
Nope! Tried a few more things, failed and gave up. Started from scratch in WPF.
-
Jun 3rd, 2014, 10:44 PM
#16
New Member
Re: Custom controls not showing up in toolbox
 Originally Posted by Mr.Nigma
Nick have you tried to place this on top of your custom control?
<ToolboxItem(True)> _
Public Class MyControl: Inherits Label
End Class
NOTE: this fix WORKED FOR ME...THX!! I created a custom ListView control to fix the selection of 'white' space in list view...ie, not selecting a listview item...if you are interested, check this out: http://stackoverflow.com/questions/2...-from-deselect ... complex fix...for what Microsoft should have thought of...anyway...this is one for the learning curve...nice tip!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|