Hello,
I have an AutoCAD .Net plugin for the company I am working at.
Unfortunately, whenever I start my application, the palette set starts off too small (width). Take a look:
The height is fine but the width isn't wide enough. How do I go about adjusting the width of my plugin when it starts up?
Here's the code I use to start up my palette set.
<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 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
Any ideas?
Thanks!
Alex
Solved! Go to Solution.
Solved by Alex_AMF. Go to Solution.
I was able to solve it by adding these two lines of code after my ps.Visible = True
ps.Size = New System.Drawing.Size(335, 600) 'Resizing
ps.Dock = Autodesk.AutoCAD.Windows.DockSides.Left