Dock ordering messed up when using my custom controls

L

Lee Grissom

LeesWizard : BaseWizard : UserControl

LeesWizardPage1 : WizardPage : UserControl

LeesWizard contains a collection of WizardPages. Each WizardPage already
contains a docked panel at the top. At design-time, when I add other panels
and dock them, things look fine. But when I close the form and re-open it,
the docking order is messed up, such that the panel I manually added now
fills up the entire surface area. So, I'm stumped. My hunch was that I
need to do something with ISupportInitialize interface?

Anybody know what I'm doing wrong?

Thanks,
Lee
 
L

Lee Grissom

Okay, here's an update on this problem:
[VS2005-SP1]

I created a simple UserControl derivative. I drop that onto a form. Then I
try to drop a panel onto the UserControl. It works, but I notice that the
parent ends up being the Form itself. I need the parent of the panel to be
the UserControl, otherwise Docking won't work. What am I missing?
 
L

Lee Grissom

Okay, second problem solved by adding this attribute:

[Designer(typeof(System.Windows.Forms.Design.ScrollableControlDesigner))]
public class WizardPage : UserControl
{}

Still have my original problem.
 

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