Home > DeveloperSection > Beginner > FlowLayoutPanel Control in C#.Net

FlowLayoutPanel Control in C#.Net


C# C# 
Ratings:
0 Comment(s)
 14690  View(s)
Rate this:

FlowLayoutPanel Control in C#.Net

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


Don't want to miss updates? Please click the below button!

Follow MindStick