System.Windows.Forms.FlowLayoutPanel Class

Represents a panel that dynamically lays out its contents horizontally or vertically.

See Also: FlowLayoutPanel Members

Syntax

[System.ComponentModel.Designer("System.Windows.Forms.Design.FlowLayoutPanelDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")]
[System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.Ask)]
[System.ComponentModel.DefaultProperty("FlowDirection")]
[System.ComponentModel.ProvideProperty("FlowBreak", typeof(System.Windows.Forms.Control))]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class FlowLayoutPanel : Panel, System.ComponentModel.IExtenderProvider

Remarks

The System.Windows.Forms.FlowLayoutPanel control arranges its contents in a horizontal or vertical flow direction. Its contents can be wrapped from one row to the next, or from one column to the next. Alternatively, its contents can be clipped instead of wrapped.

You can specify the flow direction by setting the value of the FlowLayoutPanel.FlowDirection property. The System.Windows.Forms.FlowLayoutPanel control correctly reverses its flow direction in right-to-left (RTL) layouts. You can also specify whether the contents of the System.Windows.Forms.FlowLayoutPanel control are wrapped or clipped by setting the value of the FlowLayoutPanel.WrapContents property.

Any Windows Forms control, including other instances of System.Windows.Forms.FlowLayoutPanel, can be a child of the System.Windows.Forms.FlowLayoutPanel control. With this capability, you can construct sophisticated layouts that adapt to your form's dimensions at run time.

Docking and anchoring behaviors of child controls differ from the behaviors in other container controls. Both docking and anchoring are relative to the largest control in the flow direction. For more information, see How to: Anchor and Dock Child Controls in a FlowLayoutPanel Control.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0