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.
This topic has not yet been rated - Rate this topic

FlowLayoutPanel.FlowDirection Property

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)

Not applicable.

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 Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.