I have my FlowLayout panel set to TopDown. Now the user wants to see the most recent item at the top. So I set the FLP to BottomUp flow.
When I set it to BottomUp – I only see one of my user objects in the panel and a partially cut off user object. So, only on full user object and a partially cut off one – if I have 10 user objects in the FLP – I still only see the same results – one full and one cut off – please see screenshot attached. If I set the FLP back to TopDown – I can see all user objects and it scrolls through them normally.
You can use a Panel with AutoScroll = true. Add child panels using Dock = DockStyle.Top. See new video and code below.
https://www.screencast.com/t/XUAnWbeS
private void button1_Click(object sender, EventArgs e)
{
var p = new Panel() {
BorderStyle = BorderStyle.Solid,
Text = this.panel1.Controls.Count.ToString(),
ShowHeader = true,
Dock = DockStyle.Top
};
this.panel1.Controls.Add(p);
}
I don’t think I understood completely. If you only want to scroll vertically you should use a Panel with AutoScroll = true. You can decide if a new panel goes at the top or at the bottom using Controls.SetChildIndex().
The FlowPanel manages the flow layout. BottomUp starts at the lowest left-bottom corners and “stacks” the next control on top until it reaches the top, then it starts another column and restarts from the bottom, and it keeps growing horizontally.
See video:
Please login first to submit.