目标
调整插件启动时设置的调色板大小,使其看起来像这样:
一切都在这里正确调整,看起来不错。此设置在我手动关闭 AutoCAD 时保存。虽然,我的目标是让程序像这样启动。
当前启动结果
这是我启动时的结果:
如您所见,它不够宽。宽度需要变大,但高度设置正确。
当前尝试
这是我启动应用程序时所拥有的:
<CommandMethod("Hunter-P")> _
Public Sub HunterP()
'Tool Palette
If ps Is Nothing Then
ps = New Autodesk.AutoCAD.Windows.PaletteSet("Hunter Palette Set", "", New Guid("{ECBFEC73-9FE4-4aa2-8E4B-3068E94A2BFA}"))
ps.Style = Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowPropertiesMenu Or Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowAutoHideButton Or _
Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton
projPalette = New tpProjectToolPalette(Me)
convPalette = New tpConveyorToolPalette(Me)
ps.Add("Projects", projPalette)
ps.Add("Conveyors", convPalette)
End If
ps.Visible = True
ps.Dock = Autodesk.AutoCAD.Windows.DockSides.Left ' Docks the palette set to the left
ps.Size = New System.Drawing.Size(350, 800) 'Sets the width and height
convPalette.Visible = False
'Activate Project ToolPalette
ps.Activate(0)
If m_DocData Is Nothing Then
m_DocData = New MyDocData
End If
AddHandler AcApp.DocumentManager.DocumentActivated, AddressOf Me.DocumentManager_DocumentActivated
AddHandler AcApp.DocumentManager.DocumentToBeDeactivated, AddressOf Me.DocumentManager_DocumentToBeDeactivated
End Sub
这个结果似乎并没有真正停靠调色板集。底部有多余的空间。
我们如何正确调整调色板集的大小?