- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I'm in the development process of a modular plugin solution where all the buttons are under the same
Ribbon tab but the construction of the Ribbon Panels under this common tab is being done for each module.
Meaning a user may choose to have different combinations of function which I can't predict so naturally
the code assumes it has to create this common tab because the modules aren't "aware" of each other.
The problem is, I can't find a way to check if the tab name is already exists, I can check for panels using:
GetRibbonPanels(string tabName)
I was hoping that calling for panels in a tab which doesn't exists, will return nothing but it throws an exception...
I tried using same name to check if the .CreateRebbonTab() will just ignore it, but is also throws an exception...
I could use try-catch statement but this is typically last resort and overall wrong approach in my opinion
try
{
application.CreateRibbonTab("AdvTools");
}
catch(Exception)
{
//do nothing
}
Are there any decent work-arounds for this situation ?
Solved! Go to Solution.