.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How To Resize Palettes

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Alex_AMF
1302 Views, 1 Reply

How To Resize Palettes

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:

 

p_set.png

 

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

1 REPLY 1
Message 2 of 2
Alex_AMF
in reply to: Alex_AMF

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost