Partager via


FlowDirection Énumération

Définition

Définit des constantes qui spécifient la direction dans laquelle les éléments d’interface utilisateur consécutifs sont placés dans un conteneur de disposition linéaire.

public enum class FlowDirection
public enum FlowDirection
type FlowDirection = 
Public Enum FlowDirection
Héritage
FlowDirection

Champs

Nom Valeur Description
LeftToRight 0

Les éléments circulent du bord gauche de l’aire de conception à droite.

TopDown 1

Les éléments circulent du haut de l’aire de conception vers le bas.

RightToLeft 2

Les éléments circulent du bord droit de l’aire de conception à gauche.

BottomUp 3

Les éléments circulent du bas de l’aire de conception vers le haut.

Exemples

L’exemple suivant montre comment définir la FlowDirection propriété sur un FlowLayoutPanel contrôle. Cet exemple de code fait partie d’un exemple plus large fourni pour le FlowLayoutPanel contrôle.

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

Remarques

L’énumération FlowDirection décrit la direction du flux des éléments d’interface utilisateur consécutifs, généralement des contrôles, sur une surface de conception ou un conteneur tel qu’un formulaire. Cette énumération est utilisée par des conteneurs de disposition linéaire tels que FlowLayoutPanel, qui stockent ces informations en interne dans la FlowLayoutPanel.FlowDirection propriété.

Détermine FlowDirection où un nouveau contrôle est placé par défaut lorsqu’il est ajouté à un conteneur de prise en charge. La direction du flux du conteneur, ainsi que les propriétés et Dock les Anchor propriétés de chaque contrôle contenu, déterminent la réorganisation des contrôles lorsque leur conteneur est redimensionné.

Le FlowLayoutPanel contrôle fournit une FlowBreak propriété à ses contrôles enfants. La définition de la valeur de la FlowBreak propriété entraîne true l’arrêt FlowLayoutPanel de la disposition des contrôles dans le sens actuel du flux et de l’encapsuler à la ligne ou à la colonne suivante.

S’applique à

Voir aussi