Author Topic: add Tool Palette Items  (Read 1774 times)

0 Members and 1 Guest are viewing this topic.

bkkar_55

  • Mosquito
  • Posts: 1
add Tool Palette Items
« on: May 11, 2017, 04:12:51 PM »
Hi all
I create a AutoCAD tool palette using C#
I have two questions
1- how to change tool palette Icon instead of AutoCAD default Icon
2- How too add Items to tool Palette such as (blocks or Macro buttons)..
That's what I got




[/code]
Code: [Select]
public void CreateMyPalette()
{
if(ps == null)
{
ps = new Autodesk.AutoCAD.Windows.PaletteSet("Test");
ps.Style = Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowPropertiesMenu
| Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowAutoHideButton
| Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton;
ps.Opacity = 90;
ps.Size = new System.Drawing.Size(250,250);
ps.MinimumSize = new System.Drawing.Size(225, 200);
                                ps.Add("P1", new UserControl1());
ps.Add("P2", new UserControl2());
ps.Dock = Autodesk.AutoCAD.Windows.DockSides.Left;


ps.Visible = true;
}
else
{
ps.Visible = true;
}


}