title | description | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||||
---|---|---|---|---|---|---|---|---|---|---|
FlowLayoutPanel Control Overview |
Learn about an overview of the FlowLayoutPanel control, which arranges its contents in a horizontal or vertical flow direction. |
03/30/2017 |
|
|
3883e024-f5a0-456d-9c27-b4dfa1cc9045 |
The xref:System.Windows.Forms.FlowLayoutPanel control arranges its contents in a horizontal or vertical flow direction. You can wrap the control's contents from one row to the next, or from one column to the next. Alternately, you can clip instead of wrap its contents.
You can specify the flow direction by setting the value of the xref:System.Windows.Forms.FlowLayoutPanel.FlowDirection%2A property. The xref:System.Windows.Forms.FlowLayoutPanel control correctly reverses its flow direction in Right-to-Left (RTL) layouts. You can also specify whether the xref:System.Windows.Forms.FlowLayoutPanel control's contents are wrapped or clipped by setting the value of the xref:System.Windows.Forms.FlowLayoutPanel.WrapContents%2A property.
The xref:System.Windows.Forms.FlowLayoutPanel control automatically sizes to its contents when you set the xref:System.Windows.Forms.Control.AutoSize%2A property to true
. It also provides a FlowBreak property to its child controls. Setting the value of the FlowBreak property to true
causes the xref:System.Windows.Forms.FlowLayoutPanel control to stop laying out controls in the current flow direction and wrap to the next row or column.
Any Windows Forms control can be a child of the xref:System.Windows.Forms.FlowLayoutPanel control, including other instances of xref:System.Windows.Forms.FlowLayoutPanel. With this capability, you can construct sophisticated layouts that adapt to your form's dimensions at run time.
Also see Walkthrough: Arranging Controls on Windows Forms Using a FlowLayoutPanel.
- xref:System.Windows.Forms.FlowLayoutPanel.FlowDirection%2A
- xref:System.Windows.Forms.TableLayoutPanel
- FlowLayoutPanel Control