简体   繁体   中英

Create a panel in winForms c# with multiple sections in full screen mode

I would like to create a form that can have multiple panels with a single picturebox in each panel and each panel can be moved around.

The panels need to fit on the maximum size of the monitor with each panel having equal width.

I have tried to get the form to start at the maximum size using the WindowState Property but cannot get the panels' width to be split depending on the number of panels that are there.

Also, I have tried to use a flow-panel as the main container and tried adding panels as required inside the flow-panel. The flow-panel is docked as "fit" in the form.

Can someone please explain how I can solve this problem?

Thank you in advance,

Varun

Edit: The form also needs to be able to let the user move the pictures in the picturebox around.

You can add splitContainers, that are 2 panels, and inside each panel you can add another split container, and then again and again...

To make panels fit on the maximum size of the form you'll have to use dock propery = fill or anchor it to top, right, bottom and left

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM