Search code examples
ms-wordvisual-studio-2017vstoadd-inribbonx

What is preventing me from adding a button to a button group in the Ribbon Designer?


The Problem

I'm trying to add a new button to a button group using the Visual Ribbon Designer for a Word VSTO Add-In in Visual Studio 2017. When I drag a button over a button group, I normally see options for placement represented by black lines. However, when I drag the new button over a particular button group, I get the 'unavailable' cursor, as seen in the first screenshot below.

I have yet to figure out what's preventing me from adding a new button.

Screenshots

1.

Screenshot 1 - Adding a button is not available.

2.

Screenshot 2 - Click-to-add adds a button to the beginning (or end) only.

Research and Attempts

  • The button group in question is not Locked.
  • There doesn't seem to be a maximum to the number of buttons I can add to a button group.
  • If I add a new group or button group, I am able to add new buttons as usual.
  • If I try the 'click the ribbon control, then click where you want it' method of adding a control, I can add a button to the button group, but only to the beginning or end (screenshot 2).
  • I can add the button control wherever I want if I edit Ribbon.Designer.cs manually, though I'm loath to do have to always do that.

Video!

enter image description here


Solution

  • I still don't have an answer, but I do have a workaround!

    If I hold the left mouse button while dragging the button toward the offending group, and I click and release the right-click button while hovering over that group, the glyph appears indicating that it is legal to drop the button in that spot.

    Video

    A video showing that, with right-clicking, I can add a button to a group that, until now, wasn't allowing me to drop a button there.