Question

I have a panel with its width x height is 1200 x 550. In this panel, I added controls dynamically during runtime. I was wondering, if I could dynamically position the controls from the center of the panel and as each new control added, the position of the previous controls would also dynamically reposition itself. Can anybody suggest me something? I am kinda blurred right now ohohohoho.

Thank you very much for your kind attention.

Était-ce utile?

La solution

The way I get stuff to center in the TableLayoutPanel is to have two extra columns or rows that I have set to 50% each. Any columns or rows between the two on the outside will automatically center based on the percentage. Of course, this option works best with columns or rows that are set to specific sizes or for auto adjust types.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top