Link to home
Create AccountLog in
Avatar of pvrooyen
pvrooyen

asked on

Get a System.Windows.Form.UserControl to Dock like a Dockstyle.Fill()

I have a Windows.Form frmA
Which has a panel with the Dockstryle to Fill  - frmA.Controls.Add(panel1)

and now I am adding a Windows.Forms.Usercontrol uc1 - frmA.panel1.Controls.Add (uc1) -

How do I get the usercontrol uc1 to Dockstyle.Fill the panel it was placed on?
Avatar of brawney
brawney
Flag of United States of America image

I think (keyword here is think) that I've done this before by placing a panel in the user control (uc1), setting its Dockstyle property to Fill and placing everything else in uc1 inside that panel.  

I have not had the chance to give this a test for you, but I think I've done it this way before.
ASKER CERTIFIED SOLUTION
Avatar of brawney
brawney
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of pvrooyen
pvrooyen

ASKER

I cannot believe it!  I thought there was no Dock property because I couldn't find it in the designer.