Message 1 of 6
Revit API - freezeing / hiding Buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I made myself a quick method which disable panels:
public static void DisablePanels(UIApplication application, string ribbonName, List<string> listOfPanels)
{
List<RibbonPanel> panels = application.GetRibbonPanels(ribbonName);
foreach (RibbonPanel p in panels)
{
if (listOfPanels.Contains(p.Name))
{
p.Enabled = false;
p.Visible = false;
}
}
}
And I am thinking about using RibbonPanel.Enabled or RibbonPanel.Visible.
RibbonPanel.Enabled - if sets to false it will freeze the buttons in a selected panel, but you will be able to use them with your keyboard shortcuts.
RibbonPanel.Visible - if sets to false it will completly hide the buttons from the ribbon (and you will not be able to use them with keyboard shortcuts)
Is there a way to freeze the buttons and lock them from being used? I want to use it in my Entitlement check - > using "visible" works but empty ribbon looks stupid 😉