.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to close a PaletteSet from code
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Guys,
Because there is no way to tell the difference between miniminise ("-") to close ("x") on paletteset. I put a button on my user control to write my own code to close the PaletteSet.
m_ps is the current PaletteSet, m_uc is my user control which has been loaded into m_ps.
what code I need to write inside my close button click event to unload m_uc , close m_ps and set both m_uc and m_ps to nothing?
Thanks very much
Re: How to close a PaletteSet from code
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Yaqi,
Simply set the Visible property of the palette to true/false from the button handler.
Balaji
Developer Technical Services
Autodesk Developer Network
Re: How to close a PaletteSet from code
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Help!
How can I get a PaletteSet which is not created by myself?
e.g. now I know the way to get the ribbon paletteset by Autodesk.AutoCAD.Ribbon.RibbonServices.RibbonPa
But how can I get other paletteset like this palette(or this is not a palette but a panel??):
("Task pane" in English?)
Is there a property to get all the palette collection??
Thanks for any help!
Re: How to close a PaletteSet from code
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Sorry, I dont find any way to get access to the PaletteSet that hasnt been created by you.
I am just curious to know, why you would need that if it wasnt created by your plugin ?
Balaji
Developer Technical Services
Autodesk Developer Network
Re: How to close a PaletteSet from code
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
There is nowhere to get a PaletteSet which is not created by yourself, because AutoCAD does not save it to the application settings.
What we see on AutoCAD is ToolPalette, which is different which PaletteSet. ToolPalette is stored as an external .ATC file that is controlled (read & save) by ToolPaletteManager.Manager which can load external catalogs (content location URLs) to display on this ToolPalette. I don't see .NET API to load an existing ToolPalette from an external ATC file. From there you can handle it.
PaletteSet is the code container that we can place our user controls (PaletteSet.Add method), and we have a right to handle it. But it is initialized by code and not saved to an external file like .ATC of ToolPalette.
-Khoa
Re: How to close a PaletteSet from code
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You don't have access to PaletteSets that AutoCAD creates and uses (except for the Ribbon), but most of them have commands to close them (for example, "PROPERTIESCLOSE" will close the PropertiesPalette).
