0

I have a C# form application that contains two panels. One panel (panel1) contains a data grid view and the other panel (panel2)contains some buttons and date time picker extra. What I am trying is panel1 should cover 80% of screen size and should be on the left side of the screen and panel2 should cover 20% of the screen size and should be on the right side of the screen. Through anchor property, I managed to set the left and the right location. How to set the size? any leads? Thank you.

master_yoda
  • 463
  • 3
  • 11
  • 1
    Does this answer your question? [How to position the opening form at specific location in C# Windows Forms?](https://stackoverflow.com/questions/21171764/how-to-position-the-opening-form-at-specific-location-in-c-sharp-windows-forms) – Selim Yildiz Jan 24 '20 at 08:43
  • @SelimYıldız that is about location. not about size. – master_yoda Jan 24 '20 at 08:45
  • 3
    You should place a [`TableLayoutPanel`](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.tablelayoutpanel?view=netframework-4.8) on your form and put the panels inside that, then you can specify the % each row/column should occupy. In your case, it will have only one row and two columns. – Matthew Watson Jan 24 '20 at 08:59

0 Answers0