inherited form problem: designer won't paint controls

G

Guest

I have an inherited form.
The base class has some panels and a splitter for resizing them
In the inherited form, I've placed some child controls in the right-panel.

This all works fine, run the app everything looks great.
Go back to form in designer, and now it won't paint the new child controls
in the inherited form! Still works at run-time!

The constructor of the inherited form is calling InitializeComponent() like
it should.

After that line in the constructor I had to add:

MyBase.RightPanel.Controls.Add(TabControl1)

The designer did not add that to InitializeComponent() so I added it
manually to the constructor after the call, like it says in the comment...

This just started happening today, it wasn't happening before so it leads
me to believe its something I did today, possibly in the base class...

any ideas?
 
G

Guest

I corrected this problem,

here's what I found:

The designer does not update the InitializeComponent() call
with the relationship of the control in the base class to the child
control added to the inherited form.

I had to manually add the following line of code before the
sections that configure attributes of the controls:

MyBase.RightPanel.Controls.Add(GroupBox1)

where GroupBox1 was the first control I added to the inherited form,
it was added into the RightPanel control of the base form class, but the
designer does not automatically configure this association.

Hope this helps somebody someday...

thanks for nuttin'...

me
 

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