.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Ribbon API Slide-Out
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Where are the bits of the Ribbon API to add a slide out to a ribbon panel?
Autodesk.Windows.RibbonControl ribbonControl = Autodesk.Windows.ComponentManager.Ribbon;
RibbonTab Tab = new RibbonTab();
ribbonControl.Tabs.Add(Tab);
// create Ribbon panels
Autodesk.Windows.RibbonPanelSource panel1Panel = new RibbonPanelSource();
panel1Panel.Title = "Panel1";
RibbonPanel Panel1 = new RibbonPanel();
Panel1.Source = panel1Panel;
Tab.Panels.Add(Panel1);
I saw some source that hinted you could use panel1Panel.AddSlideout() but in the search I do not see any Ribbon API that allows for any slideout functionality?
Do you *have* to use the CUI API for this?
Solved! Go to Solution.
Re: Ribbon API Slide-Out
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
RibbonPanelBreak
From the docs:
This class is used to organize a ribbon panel into main and slide-out panels.
Add an object of this type to RibbonPanelSource.Items to move all the items after this item into the slide-out panel. There can be only one object of this type in RibbonPanelSource. If there are multiple RibbonPanelBreak objects in the same panel source, only the first one will be used.
Re: Ribbon API Slide-Out
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks!
Is there also a way to get the dialog launch arrow in the corner working?
I found RibbonDialogBoxLauncher but this is in the Customization namespace associated with the cui dll. Is there also a way to do this with the ribbon API and not the CUI API?
Re: Ribbon API Slide-Out
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I think I found it:
RibbonCommandItem
Create it and add it to RibbonPanelSource. I am having trouble getting an image to show in it, must need a certain size and wont scale whatever you pass to it.
Re: Ribbon API Slide-Out
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I ran into problems with this myself. Here's some sample code to show how it works.
public class Class1
{
[CommandMethod("testmyRibbon", CommandFlags.Transparent)]
public void Testme()
{
RibbonControl ribbon = ComponentManager.Ribbon;
if (ribbon != null)
{
RibbonTab rtab = ribbon.FindTab("TESTME");
if (rtab != null)
{
ribbon.Tabs.Remove(rtab);
}
rtab = new RibbonTab();
rtab.Title = "TEST ME";
rtab.Id = "Testing";
//Add the Tab
ribbon.Tabs.Add(rtab);
addContent(rtab);
}
}
static void addContent(RibbonTab rtab)
{
rtab.Panels.Add(AddOnePanel());
}
static RibbonPanel AddOnePanel()
{
RibbonButton rb;
RibbonPanelSource rps = new RibbonPanelSource();
rps.Title = "Test One";
RibbonPanel rp = new RibbonPanel();
rp.Source = rps;
//Create a Command Item that the Dialog Launcher can use,
// for this test it is just a place holder.
RibbonButton rci = new RibbonButton();
rci.Name = "TestCommand";
//assign the Command Item to the DialgLauncher which auto-enables
// the little button at the lower right of a Panel
rps.DialogLauncher = rci;
rb = new RibbonButton();
rb.Name = "Test Button";
rb.ShowText = true;
rb.Text = "Test Button";
//Add the Button to the Tab
rps.Items.Add(rb);
return rp;
}
}
Re: Ribbon API Slide-Out
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Nice, thanks! This did the trick.

