Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Stacked large buttons in ribbon?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
edgars_miskins
337 Views, 3 Replies

Stacked large buttons in ribbon?

Hello, to all.
I am trying to create my own custom ribbon panel with my own buttons.
I've come to understand, that whether I get a large button or a small one depends on whether I use stacking.
It stacking is not used, a large button is created. If stacking is used - small ones.


But in the original Revit UI there seem to be cases with large stacked buttons. For example these are clearly large buttons stacked.

7RF2kbjeUY.png

How is this done?

When I do the regular stacking like so

var manualButtonsLeft = ribbonPanelWallbox.AddStackedItems(
                btn_scBxManual_TopLeft,
                btn_scBxManual_BotLeft);

I always get small buttons:

0G2TloFo78.png

Is there a way to change button size?

Labels (3)
3 REPLIES 3
Message 2 of 4

void SetLargeButtonStyle(RibbonButton button)
{
    button.ResizeStyle = RibbonItemResizeStyles.NoResize;
    button.Orientation = Orientation.Vertical;
    button.Size        = RibbonItemSize.Large;
}

Note that the RibbonButton is Autodesk.Windows.RibbonButton provided by AdWindows.dll

Message 3 of 4

That was it. Thank you!
I was trying to achieve this without AdWindows.

Interesting, how the use of AdWindows.dll is not officially supported, but lots of useful tweaks are available only through this library.

Message 4 of 4

It is officially supported, partially, not by Revit but by AutoCAD. You can refer to the AutoCAD managed .NET docs.

BTW, visual studio intellisense could actually be a much better documentation after hours of exploring.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community