More Dev Studio fun time happiness

Wild times tonight.

So, I'm working on my editor again (because ... you know ... I don't need sleep) and I run into a very interesting situation.

I've created a new UserControl called RenderPanel. It derives from System::Windows::Forms::Panel. This is a new control. I'd like it to show up in the toolbox. It doesn't.

So, I say "What the heck" and add it into the form designer by hand. Compiles fine and I get my resultant render view.

Then I try to run Visual Studio's designer on it. Nuh-un. I get a plethora of issues from the designer, telling me that I can't open the form because my RenderView isn't defined.


So, I dig. A lot. I code. A lot. Nothing seems to help. Then I run across this little article:

Nah, it can't be that easy, can it? So, I go to the menu Tools->Options and then in the Windows Forms Designer, I enable the AutoToolboxPopulate field. I close the project, open the project and lo and behold, I have a new toolbox group called Sanity_20 Components (the editor is called Sanity ... I'm at Revision 2.0) and there to my complete shock is a little blue gear labeled 'RenderPanel'.

And I can add it to my form. And it works.

Completely unbelieveable. But who am I to argue?


Popular Posts