c# - auto resizing panel on a form -


I have two panels on one form. I want one of them, when a user maximizes the form, then Depending on the form, the panel can also be maximized. I tried and panels are shown on the entire form, hiding the other panel. Here's my code:

  Public MainForm () {InitializeComponent (); Panel 2 Anchor = (anchorstyle.bottom | anchorstyle. Right); Panel 2 Doc = DocStyle. fill; TaskControl T = new task control (); Int x, y; X = 0; Y = 0; T. Place = new point (x, y); Panel2.Controls.Add (t); T.BringToFront (); }   

I managed to do it. I have changed the values ​​of anchor with properties Thanks for the help!

You should not do this at the beginning, but also in Form_Resize events and so on. For example, you can handle the Form.ResizeEnd event, see the reference.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -