【发布时间】:2017-07-01 17:04:15
【问题描述】:
我正在苦苦挣扎,因为我找不到可以为我的 powershell 脚本添加滚动按钮的命令。我在脚本中有多个选项卡。现在我有更多的选项卡超出了脚本窗口的容量。如何启用可以在 powershell gui 选项卡之间切换的滚动按钮?
很抱歉没有添加脚本。
################ Forms ########################
$Form = New-Object System.Windows.Forms.Form
$Form.size = New-Object System.Drawing.Size(505,570)
$form.text = "Integrated"
################ Tabs ########################
$tabcontrols = New-Object System.Windows.Forms.TabControl
$tabcontrols.Size = New-Object System.Drawing.Size(605,570)
$form.Controls.Add($tabcontrols)
$tabMailboxScript = New-Object System.Windows.Forms.TabPage
$tabMailboxScript.Text = "Mailbox details"
$tabcontrols.Controls.Add($tabMailboxScript)
$tabCFGOwnerScript = New-Object System.Windows.Forms.TabPage
$tabCFGOwnerScript.Text = "CFG Owner"
$tabcontrols.Controls.Add($tabCFGOwnerScript)
$tabGetACLScript = New-Object System.Windows.Forms.TabPage
$tabGetACLScript.Text = "Get-ACL"
$tabcontrols.Controls.Add($tabGetACLScript)
$tabCFGFolderScript = New-Object System.Windows.Forms.TabPage
$tabCFGFolderScript.Text = "CFG Folder"
$tabcontrols.Controls.Add($tabCFGFolderScript)
【问题讨论】:
-
你能添加你的代码来设置你的标签吗? minimal reproducible example
标签: winforms powershell user-interface