Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FlowLayoutPanel.FlowDirection Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets a value indicating the flow direction of the FlowLayoutPanel control.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

[LocalizableAttribute(true)] 
public FlowDirection FlowDirection { get; set; }
/** @property */
public FlowDirection get_FlowDirection ()

/** @property */
public void set_FlowDirection (FlowDirection value)

public function get FlowDirection () : FlowDirection

public function set FlowDirection (value : FlowDirection)

Property Value

One of the FlowDirection values indicating the direction of consecutive placement of controls in the panel. The default is LeftToRight.

The FlowDirection property is the default property for the FlowLayoutPanel class.

The following code example sets the value of FlowDirection depending on the selected RadioButton.

private void flowTopDownBtn_CheckedChanged(
    System.Object sender, 
    System.EventArgs e)
{
    this.FlowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
}

private void flowBottomUpBtn_CheckedChanged(
    System.Object sender, 
    System.EventArgs e)
{
    this.FlowLayoutPanel1.FlowDirection = FlowDirection.BottomUp;
}

private void flowLeftToRight_CheckedChanged(
    System.Object sender, 
    System.EventArgs e)
{
    this.FlowLayoutPanel1.FlowDirection = FlowDirection.LeftToRight;
}

private void flowRightToLeftBtn_CheckedChanged(
    System.Object sender, 
    System.EventArgs e)
{
    this.FlowLayoutPanel1.FlowDirection = FlowDirection.RightToLeft;
}

private void flowTopDownBtn_CheckedChanged(Object sender,
    System.EventArgs e)
{
    this.flowLayoutPanel1.set_FlowDirection(FlowDirection.TopDown);
} //flowTopDownBtn_CheckedChanged

private void flowBottomUpBtn_CheckedChanged(Object sender,
    System.EventArgs e)
{
    this.flowLayoutPanel1.set_FlowDirection(FlowDirection.BottomUp);
} //flowBottomUpBtn_CheckedChanged

private void flowLeftToRight_CheckedChanged(Object sender, 
    System.EventArgs e)
{
    this.flowLayoutPanel1.set_FlowDirection(FlowDirection.LeftToRight);
} //flowLeftToRight_CheckedChanged

private void flowRightToLeftBtn_CheckedChanged(Object sender,
    System.EventArgs e)
{
    this.flowLayoutPanel1.set_FlowDirection(FlowDirection.RightToLeft);
} //flowRightToLeftBtn_CheckedChanged

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft