Custom panels

J

Joe

I trying to create 2 custom panels. Panel 1 can only contain objects of type
panel2 and panel2 can only contain certain objects.

At design time if I drop panel2 in panel1, panel1 does not become the
parent. I have to set it in code. Also, if I click on panel2 when its parent
has been set, I cannot click on and drag panel2 at all. I can only change
its location by change the X & Y properties of location.

Any suggestions as to what could be going wrong?

-Joe
 
J

Jeffrey Tan[MSFT]

Hi Buddy,

Thanks for your post.

For parent, I assume that you mean the container, yes? That is panel2 is
added into panel1.Controls property collection.

I have just tried to drag 2 panels on the designer, both VS.net2003 and
VS2005 will work well: designer will generate the following code:
this.panel1.Controls.Add(this.panel2);

Also, I can drag the pane2 with position changing without any problem.

So I suggest you try this on some other machines. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

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