I apologize for not using the correct terminology. I tried anchoring and setting the dockstyle to fill without success. This is what I have now:
The panel is docked in the main window. If I replace userCtrl with pnlXVw in the anchor above, my docking of the panel in the main window doesn't work correctly. It moves the panel with the window but with a 20 or so pixels in between. Also, the UserControl still doesn't move.Code:UsrCtrl userCtrl = new UsrCtrl(); userCtrl.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left); userCtrl.Dock = System.Windows.Forms.DockStyle.Fill; pnlXVw.Controls.Add(userCtrl);




Reply With Quote