articles

Home / DeveloperSection / Articles / FlowLayoutPanel Control in C#.Net

FlowLayoutPanel Control in C#.Net

John Smith26558 24-Jan-2011

The FlowLayoutPanel dynamically repositions the controls it contains. The FlowLayoutPanel also supports Scroll when the AutoScroll property is set to True.

Drag and drop FlowLayoutPanel from toolbox on the window Form.

FlowLayoutPanel Control in C#.Net

When you drag and drop other control like Button, ListView and Label in FlowLayoutPanel then it will automatically arrange the control.

FlowLayoutPanel Control in C#.Net

FlowLayoutPanel Properties

FlowDirection:  You can also set Flow direction in which control will flow through Flow Direction property (LeftToRight, Top Down, RightToLeft, and Bottom Up).

Example:

private void frmFlowLayoutPanel_Load(object sender, EventArgs e)
{
              //set the FlowDirection in which control will Flow
              flowLayoutPanel1.FlowDirection=FlowDirection.TopDown;
}


FlowLayoutPanel Control in C#.Net

BorderStyle:   Border of FlowLayoutPanel can be set through BorderStyle properties.

AutoScroll:   When AutoScroll property is set to True then FlowLayoutPanel supports Scroll. FlowLayoutPanel will show scroll bar when some control not fit in the specified area of FlowLayoutPanel.

Example:

private void frmFlowLayoutPanel_Load(object sender, EventArgs e)
{
              //set autoscroll to true
              flowLayoutPanel1.AutoScroll = true;
}

 

FlowLayoutPanel Control in C#.Net


Updated 28-May-2020
I am best.

Leave Comment

Comments

Liked By