Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to move multiple panels as one in vb?

I am making an application in Visual Basic as I am new to programming. I am trying to get it to be like wordle. After a user inputs a word, a panel box is made and multiple labels are placed inside of the panel box. Now for future guesses, I need to move that panel box down and place the new panel box in the original spot. To sum it up, newest panels show up at the top and oldest panels show up at the bottom.

Because a new panel is being made each time I just tried to simply move it before making a new one, did not work. If any code is required to help me I would be happy to provide it.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You should use a FlowLayoutPanel as a container for the other Panel controls. You can simply add a child control to it and it will handle the layout, so you don’t have to worry about setting or changing the Location of each child. If you use myFlowLayoutPanel.Controls.Insert and specify 0 as the index, the new child control will be placed at the start and all other children will be pushed down automatically.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading