FlowLayoutPanel.FlowDirection Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating the flow direction of the FlowLayoutPanel control.
public:
property System::Windows::Forms::FlowDirection FlowDirection { System::Windows::Forms::FlowDirection get(); void set(System::Windows::Forms::FlowDirection value); };
public System.Windows.Forms.FlowDirection FlowDirection { get; set; }
member this.FlowDirection : System.Windows.Forms.FlowDirection with get, set
Public Property FlowDirection As FlowDirection
Property Value
One of the FlowDirection values indicating the direction of consecutive placement of controls in the panel. The default is LeftToRight.
Examples
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(
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 Sub flowTopDownBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles flowTopDownBtn.CheckedChanged
Me.FlowLayoutPanel1.FlowDirection = FlowDirection.TopDown
End Sub
Private Sub flowBottomUpBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles flowBottomUpBtn.CheckedChanged
Me.FlowLayoutPanel1.FlowDirection = FlowDirection.BottomUp
End Sub
Private Sub flowLeftToRight_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles flowLeftToRight.CheckedChanged
Me.FlowLayoutPanel1.FlowDirection = FlowDirection.LeftToRight
End Sub
Private Sub flowRightToLeftBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles flowRightToLeftBtn.CheckedChanged
Me.FlowLayoutPanel1.FlowDirection = FlowDirection.RightToLeft
End Sub
Remarks
The FlowDirection property is the default property for the FlowLayoutPanel class.
Applies to
See also
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET