1
如何控制此窗體的佈局,以便我的組框對齊垂直?Powershell窗體佈局
說我創建一個表單是這樣的:
$form = New-Object System.Windows.Forms.Form
$groupBox1 = New-Object System.Windows.Forms.GroupBox
$groupBox1.text = "Group Box 1"
$groupBox2 = New-Object System.Windows.Forms.GroupBox
$groupBox2.text = "Group Box 2"
$form.controls.add($groupBox1)
$form.controls.add($groupBox2)
$form.showdialog()
這樣做只能說明我的$groupBox1
組框。任何幫助是極大的讚賞!
有多個面板:https://msdn.microsoft.com/en-us/library/system.windows .forms.panel(v = vs.110).aspx它看起來像FlowLayoutPanel和SplitterPanel是可以用來回答這個問題的其他兩種類型,儘管還有其他類型的面板。 – Andrew
On FlowLayoutPanel:https://docs.microsoft.com/en-us/dotnet/framework/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-flowlayoutpanel-control – Andrew