Reputation: 125
Imagine a panel with 4 PictureBox aligned in one line and then you decrease the size of the window and hence the panel size (it's anchored). Then, when there is no space for 4 PictureBox in one line, the last one goes down to the second line, becoming three PB in the superior line and the forth PB in the second.
If you continue decreasing the window size, the boxes will go down until remain a unique column of PictureBox.
The only idea that came mind was use "if" conditions... Is there an easier way to do that? I thought it could be made by some property of the panel or PB, but I'm wrong I suppose...
Summarizing: How to make the elements inside a panel be adjusted to fit in the panel when you change your size?!
Here it goes a image to illustrate the situation:
@Idle_Mind, Yes, Windows Forms Application. I've forgotten the FlowLayoutPanel, but I don't like it very much, if someone knows some way more easy, feel free to comment. For now, I will use the FLP. Thank you n_n
Upvotes: 0
Views: 79
Reputation: 125
Just passing by to mark the question as answered (it's on a comment above). I didn't know about controls as FlowLayoutPanel or WrapPanel. Thanks Idle_Mind.
Upvotes: 0