4

I'm working on Office Add-in commands. If the group has only two buttons (see Group 1 on the image below), the buttons are large as I expect. In same time, if the group has four buttons (see Group 2 on the image below), it will auto scale three of them into small.

enter image description here

How can I disable office auto scale the buttons?

1 Answer 1

6

Office Add-ins XML manifest doesn't provide the ability to set specific size of the button (Large vs. Small). As the ribbon gets more crowded, the add-in commands will adjust (collapse) in an orderly way. In all cases, the add-in commands for an add-in will be grouped together. More on the topic you may find at: How do add-in commands appear?

EDIT:

After your comment I have verified myself how buttons behave when resizing the window and get less space for ribbon controls. The following are the stages:

  1. Lot of space for ribbon controls

enter image description here

  1. Resizing down and ribbon gets "crowed"

enter image description here

  1. Resizing even more to get kick for collapsing the ribbon groups

enter image description here

As you may observe this logic is built in into application and match to description from the documentation I have mentioned above. Your question is "why three items get small buttons when the group has more than three elements?" (see point #1). Well, over here I can only observe and speculate that it is internal implementation for desktop apps. Documentation has luck of such information and may be someone from Microsoft Office team able to clarify why this work like that.

Conclusion: There is no (documented) way to specify the size of the ribbon control in the manifest file.

Work around: You may group your controls in the groups by 1, 2 or 3 controls to be displayed as Large item. Be prepared user may see the smaller version of your controls anyway, which means at least provide meaningful Supertip.

Anything else: If this is something you desperately need to be included as the new feature to the Office.js you may add your scenario into https://officespdev.uservoice.com/

Sign up to request clarification or add additional context in comments.

2 Comments

Many thanks for answer my question! But even I only create one group with four buttons in customTab, it also collapsed. It does not so crowded, and looks strange. There are some groups in office's build in group also include more than four bottons and will not been collapsed. Maybe there are some way to controll it?
@AlvinWang I have edited my answer, please have a look.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.