當前位置: 首頁>>代碼示例>>VB.NET>>正文


VB.NET FlowLayoutPanel.FlowDirection屬性代碼示例

本文整理匯總了VB.NET中System.Windows.Forms.FlowLayoutPanel.FlowDirection屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET FlowLayoutPanel.FlowDirection屬性的具體用法?VB.NET FlowLayoutPanel.FlowDirection怎麽用?VB.NET FlowLayoutPanel.FlowDirection使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在System.Windows.Forms.FlowLayoutPanel的用法示例。


在下文中一共展示了FlowLayoutPanel.FlowDirection屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。

示例1:

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
開發者ID:VB.NET開發者,項目名稱:System.Windows.Forms,代碼行數:35,代碼來源:FlowLayoutPanel.FlowDirection

示例2: MainClass

' 導入命名空間
Imports System
Imports System.Data
Imports System.Windows.Forms
Imports System.Drawing

Public Class MainClass
    
    Shared Sub Main()
        Dim form1 As Form = New Form1
        Application.Run(form1)
    End Sub
End Class

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Public Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.FlowLayoutPanel1 = New System.Windows.Forms.FlowLayoutPanel
        Me.Button1 = New System.Windows.Forms.Button
        Me.Button2 = New System.Windows.Forms.Button
        Me.Button3 = New System.Windows.Forms.Button
        Me.Button4 = New System.Windows.Forms.Button
        Me.Button5 = New System.Windows.Forms.Button
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.FlowLayoutPanel2 = New System.Windows.Forms.FlowLayoutPanel
        Me.Button6 = New System.Windows.Forms.Button
        Me.Button7 = New System.Windows.Forms.Button
        Me.Button8 = New System.Windows.Forms.Button
        Me.Button9 = New System.Windows.Forms.Button
        Me.Button10 = New System.Windows.Forms.Button
        Me.Label3 = New System.Windows.Forms.Label
        Me.FlowLayoutPanel3 = New System.Windows.Forms.FlowLayoutPanel
        Me.Button11 = New System.Windows.Forms.Button
        Me.Button12 = New System.Windows.Forms.Button
        Me.Button13 = New System.Windows.Forms.Button
        Me.Button14 = New System.Windows.Forms.Button
        Me.Button15 = New System.Windows.Forms.Button
        Me.Label4 = New System.Windows.Forms.Label
        Me.FlowLayoutPanel4 = New System.Windows.Forms.FlowLayoutPanel
        Me.Button16 = New System.Windows.Forms.Button
        Me.Button17 = New System.Windows.Forms.Button
        Me.Button18 = New System.Windows.Forms.Button
        Me.Button19 = New System.Windows.Forms.Button
        Me.Button20 = New System.Windows.Forms.Button
        Me.FlowLayoutPanel1.SuspendLayout()
        Me.FlowLayoutPanel2.SuspendLayout()
        Me.FlowLayoutPanel3.SuspendLayout()
        Me.FlowLayoutPanel4.SuspendLayout()
        Me.SuspendLayout()
        '
        'FlowLayoutPanel1
        '
        Me.FlowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.FlowLayoutPanel1.Controls.Add(Me.Button1)
        Me.FlowLayoutPanel1.Controls.Add(Me.Button2)
        Me.FlowLayoutPanel1.Controls.Add(Me.Button3)
        Me.FlowLayoutPanel1.Controls.Add(Me.Button4)
        Me.FlowLayoutPanel1.Controls.Add(Me.Button5)
        Me.FlowLayoutPanel1.Location = New System.Drawing.Point(8, 24)
        Me.FlowLayoutPanel1.Name = "FlowLayoutPanel1"
        Me.FlowLayoutPanel1.Size = New System.Drawing.Size(144, 128)
        Me.FlowLayoutPanel1.TabIndex = 0
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(3, 3)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(56, 32)
        Me.Button1.TabIndex = 0
        Me.Button1.Text = "Button1"
        '
        'Button2
        '
        Me.Button2.Location = New System.Drawing.Point(65, 3)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(56, 32)
        Me.Button2.TabIndex = 1
        Me.Button2.Text = "Button2"
        '
        'Button3
        '
        Me.Button3.Location = New System.Drawing.Point(3, 41)
        Me.Button3.Name = "Button3"
        Me.Button3.Size = New System.Drawing.Size(56, 32)
        Me.Button3.TabIndex = 2
        Me.Button3.Text = "Button3"
        '
        'Button4
        '
        Me.Button4.Location = New System.Drawing.Point(65, 41)
        Me.Button4.Name = "Button4"
        Me.Button4.Size = New System.Drawing.Size(56, 32)
        Me.Button4.TabIndex = 3
        Me.Button4.Text = "Button4"
        '
        'Button5
        '
        Me.Button5.Location = New System.Drawing.Point(3, 79)
        Me.Button5.Name = "Button5"
        Me.Button5.Size = New System.Drawing.Size(56, 32)
        Me.Button5.TabIndex = 4
        Me.Button5.Text = "Button5"
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(8, 8)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(144, 16)
        Me.Label1.TabIndex = 1
        Me.Label1.Text = "LeftToRight"
        Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(160, 8)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(144, 16)
        Me.Label2.TabIndex = 3
        Me.Label2.Text = "RightToLeft"
        Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'FlowLayoutPanel2
        '
        Me.FlowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.FlowLayoutPanel2.Controls.Add(Me.Button6)
        Me.FlowLayoutPanel2.Controls.Add(Me.Button7)
        Me.FlowLayoutPanel2.Controls.Add(Me.Button8)
        Me.FlowLayoutPanel2.Controls.Add(Me.Button9)
        Me.FlowLayoutPanel2.Controls.Add(Me.Button10)
        Me.FlowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft
        Me.FlowLayoutPanel2.Location = New System.Drawing.Point(160, 24)
        Me.FlowLayoutPanel2.Name = "FlowLayoutPanel2"
        Me.FlowLayoutPanel2.Size = New System.Drawing.Size(144, 128)
        Me.FlowLayoutPanel2.TabIndex = 2
        '
        'Button6
        '
        Me.Button6.Location = New System.Drawing.Point(81, 3)
        Me.Button6.Name = "Button6"
        Me.Button6.Size = New System.Drawing.Size(56, 32)
        Me.Button6.TabIndex = 0
        Me.Button6.Text = "Button 1"
        '
        'Button7
        '
        Me.Button7.Location = New System.Drawing.Point(19, 3)
        Me.Button7.Name = "Button7"
        Me.Button7.Size = New System.Drawing.Size(56, 32)
        Me.Button7.TabIndex = 1
        Me.Button7.Text = "Button 2"
        '
        'Button8
        '
        Me.Button8.Location = New System.Drawing.Point(81, 41)
        Me.Button8.Name = "Button8"
        Me.Button8.Size = New System.Drawing.Size(56, 32)
        Me.Button8.TabIndex = 2
        Me.Button8.Text = "Button 3"
        '
        'Button9
        '
        Me.Button9.Location = New System.Drawing.Point(19, 41)
        Me.Button9.Name = "Button9"
        Me.Button9.Size = New System.Drawing.Size(56, 32)
        Me.Button9.TabIndex = 3
        Me.Button9.Text = "Button 4"
        '
        'Button10
        '
        Me.Button10.Location = New System.Drawing.Point(81, 79)
        Me.Button10.Name = "Button10"
        Me.Button10.Size = New System.Drawing.Size(56, 32)
        Me.Button10.TabIndex = 4
        Me.Button10.Text = "Button 5"
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(160, 168)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(144, 16)
        Me.Label3.TabIndex = 7
        Me.Label3.Text = "BottomUp"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'FlowLayoutPanel3
        '
        Me.FlowLayoutPanel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.FlowLayoutPanel3.Controls.Add(Me.Button11)
        Me.FlowLayoutPanel3.Controls.Add(Me.Button12)
        Me.FlowLayoutPanel3.Controls.Add(Me.Button13)
        Me.FlowLayoutPanel3.Controls.Add(Me.Button14)
        Me.FlowLayoutPanel3.Controls.Add(Me.Button15)
        Me.FlowLayoutPanel3.FlowDirection = System.Windows.Forms.FlowDirection.BottomUp
        Me.FlowLayoutPanel3.Location = New System.Drawing.Point(160, 184)
        Me.FlowLayoutPanel3.Name = "FlowLayoutPanel3"
        Me.FlowLayoutPanel3.Size = New System.Drawing.Size(144, 128)
        Me.FlowLayoutPanel3.TabIndex = 6
        '
        'Button11
        '
        Me.Button11.Location = New System.Drawing.Point(3, 89)
        Me.Button11.Name = "Button11"
        Me.Button11.Size = New System.Drawing.Size(56, 32)
        Me.Button11.TabIndex = 0
        Me.Button11.Text = "Button 1"
        '
        'Button12
        '
        Me.Button12.Location = New System.Drawing.Point(3, 51)
        Me.Button12.Name = "Button12"
        Me.Button12.Size = New System.Drawing.Size(56, 32)
        Me.Button12.TabIndex = 1
        Me.Button12.Text = "Button 2"
        '
        'Button13
        '
        Me.Button13.Location = New System.Drawing.Point(3, 13)
        Me.Button13.Name = "Button13"
        Me.Button13.Size = New System.Drawing.Size(56, 32)
        Me.Button13.TabIndex = 2
        Me.Button13.Text = "Button 3"
        '
        'Button14
        '
        Me.Button14.Location = New System.Drawing.Point(65, 89)
        Me.Button14.Name = "Button14"
        Me.Button14.Size = New System.Drawing.Size(56, 32)
        Me.Button14.TabIndex = 3
        Me.Button14.Text = "Button 4"
        '
        'Button15
        '
        Me.Button15.Location = New System.Drawing.Point(65, 51)
        Me.Button15.Name = "Button15"
        Me.Button15.Size = New System.Drawing.Size(56, 32)
        Me.Button15.TabIndex = 4
        Me.Button15.Text = "Button 5"
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(8, 168)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(144, 16)
        Me.Label4.TabIndex = 5
        Me.Label4.Text = "TopDown"
        Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'FlowLayoutPanel4
        '
        Me.FlowLayoutPanel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.FlowLayoutPanel4.Controls.Add(Me.Button16)
        Me.FlowLayoutPanel4.Controls.Add(Me.Button17)
        Me.FlowLayoutPanel4.Controls.Add(Me.Button18)
        Me.FlowLayoutPanel4.Controls.Add(Me.Button19)
        Me.FlowLayoutPanel4.Controls.Add(Me.Button20)
        Me.FlowLayoutPanel4.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
        Me.FlowLayoutPanel4.Location = New System.Drawing.Point(8, 184)
        Me.FlowLayoutPanel4.Name = "FlowLayoutPanel4"
        Me.FlowLayoutPanel4.Size = New System.Drawing.Size(144, 128)
        Me.FlowLayoutPanel4.TabIndex = 4
        '
        'Button16
        '
        Me.Button16.Location = New System.Drawing.Point(3, 3)
        Me.Button16.Name = "Button16"
        Me.Button16.Size = New System.Drawing.Size(56, 32)
        Me.Button16.TabIndex = 0
        Me.Button16.Text = "Button 1"
        '
        'Button17
        '
        Me.Button17.Location = New System.Drawing.Point(3, 41)
        Me.Button17.Name = "Button17"
        Me.Button17.Size = New System.Drawing.Size(56, 32)
        Me.Button17.TabIndex = 1
        Me.Button17.Text = "Button 2"
        '
        'Button18
        '
        Me.Button18.Location = New System.Drawing.Point(3, 79)
        Me.Button18.Name = "Button18"
        Me.Button18.Size = New System.Drawing.Size(56, 32)
        Me.Button18.TabIndex = 2
        Me.Button18.Text = "Button 3"
        '
        'Button19
        '
        Me.Button19.Location = New System.Drawing.Point(65, 3)
        Me.Button19.Name = "Button19"
        Me.Button19.Size = New System.Drawing.Size(56, 32)
        Me.Button19.TabIndex = 3
        Me.Button19.Text = "Button 4"
        '
        'Button20
        '
        Me.Button20.Location = New System.Drawing.Point(65, 41)
        Me.Button20.Name = "Button20"
        Me.Button20.Size = New System.Drawing.Size(56, 32)
        Me.Button20.TabIndex = 4
        Me.Button20.Text = "Button 5"
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(312, 319)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.FlowLayoutPanel3)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.FlowLayoutPanel4)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.FlowLayoutPanel2)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.FlowLayoutPanel1)
        Me.Name = "Form1"
        Me.Text = "FlowDirections"
        Me.FlowLayoutPanel1.ResumeLayout(False)
        Me.FlowLayoutPanel2.ResumeLayout(False)
        Me.FlowLayoutPanel3.ResumeLayout(False)
        Me.FlowLayoutPanel4.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents FlowLayoutPanel1 As System.Windows.Forms.FlowLayoutPanel
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents Button3 As System.Windows.Forms.Button
    Friend WithEvents Button4 As System.Windows.Forms.Button
    Friend WithEvents Button5 As System.Windows.Forms.Button
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents FlowLayoutPanel2 As System.Windows.Forms.FlowLayoutPanel
    Friend WithEvents Button6 As System.Windows.Forms.Button
    Friend WithEvents Button7 As System.Windows.Forms.Button
    Friend WithEvents Button8 As System.Windows.Forms.Button
    Friend WithEvents Button9 As System.Windows.Forms.Button
    Friend WithEvents Button10 As System.Windows.Forms.Button
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents FlowLayoutPanel3 As System.Windows.Forms.FlowLayoutPanel
    Friend WithEvents Button11 As System.Windows.Forms.Button
    Friend WithEvents Button12 As System.Windows.Forms.Button
    Friend WithEvents Button13 As System.Windows.Forms.Button
    Friend WithEvents Button14 As System.Windows.Forms.Button
    Friend WithEvents Button15 As System.Windows.Forms.Button
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents FlowLayoutPanel4 As System.Windows.Forms.FlowLayoutPanel
    Friend WithEvents Button16 As System.Windows.Forms.Button
    Friend WithEvents Button17 As System.Windows.Forms.Button
    Friend WithEvents Button18 As System.Windows.Forms.Button
    Friend WithEvents Button19 As System.Windows.Forms.Button
    Friend WithEvents Button20 As System.Windows.Forms.Button

End Class
開發者ID:VB程序員,項目名稱:System.Windows.Forms,代碼行數:372,代碼來源:FlowLayoutPanel.FlowDirection


注:本文中的System.Windows.Forms.FlowLayoutPanel.FlowDirection屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。