locked
Adding ribbon groups to context sensitive ribbon tabs RRS feed

  • Question

  • Hi

    I am working with VSTO in visual studio 2008 building a Word add-in using the ribbon designer.

    I would like to add a menu group to the "Layout" tab in the "Table Tools" tab set (TabSetTableTools). From the documented ControlIds I believe that I should be using the TabTableToolsLayout tab name but the new controls do not display. I am guessing that this may be something to do with the tab set being hidden when Word first starts.

    Is there something special required when working with context sesitive tab sets?

    As a side issue - in an ideal world I would lke to be able to hide some of the standard controls on this menu. I am working with tables in content controls that are locked so all the standard functionality is disabled. Is there a more granular approach to working with the ribbon than specifying "StartFromScratch"?
    Sunday, December 7, 2008 8:01 AM

Answers

  • An update
     
    I was originally trying to combine a "designer" ribbon with a "ribbon xml" solution (to try and take advantage of the designer for the non-context sensitive tabs. It would appear that this is not possible. When I put all the code in a ribbon xml menu it works.

    Unfortunately this means I am stuck with no designer...

    Andrew Wiles
    www.it-workplace.com
    Wednesday, December 10, 2008 4:18 PM
  • Hi Andrew


    To be honest Cindy I would prefer that they work on getting the core functionality up to scratch before worrying too much about the designer. There are a number of restrictions that make creating a ribbon that matches the fidelity of host application virtually impossible. I have posted some requests on connect under the heading "FEATURE REQUEST: Extended ribbon functionality"


    You are not alone in this :-) However, most of what you want is controlled not by the VSTO team, but the Office UI team. Totally unrelated group. VSTO is basically a "consumer" of that the UI team provides. The VSTO team "wraps" the Ribbon XML so that you can use it in a more "developer-friendly" manner, but they can't add things to the basic Ribbon XML that don't exist.

    1. Ability to define horizontal and vertical containers for use within a ribbon group. It is currently not possible to create a group of controls which replicate the layout of the Font group on the Home menu of Word. To do this you would need to group several controls in a horizontal container on a "row" rather than working with the default vertical layout.

    I'm not quite clear on this point. Are you aware of the box and buttongroup elements you could use to force a line of controls horizontally? If yes, and that doesn't help, you should mention this in your "spec" and explain where these fail.

    FWIW, having access to the internal sizing algorithm Office uses for groups and controls is something that's often requested. You might want to do a little quiet lobbying in some of the Office programming newsgroups you'll find listed in Please Read First for your connect issue. However, you do need to be aware that the best the Visual Studio folks on Connect can do is pass this along to the Office UI team (who have no official way for you to make suggestions).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Andrew Wiles Thursday, December 11, 2008 9:10 AM
    Thursday, December 11, 2008 9:01 AM

All replies

  • An update
     
    I was originally trying to combine a "designer" ribbon with a "ribbon xml" solution (to try and take advantage of the designer for the non-context sensitive tabs. It would appear that this is not possible. When I put all the code in a ribbon xml menu it works.

    Unfortunately this means I am stuck with no designer...

    Andrew Wiles
    www.it-workplace.com
    Wednesday, December 10, 2008 4:18 PM
  • Andrew Wiles said:

    I was originally trying to combine a "designer" ribbon with a "ribbon xml" solution (to try and take advantage of the designer for the non-context sensitive tabs. It would appear that this is not possible. When I put all the code in a ribbon xml menu it works.

    Unfortunately this means I am stuck with no designer...


    Indeed, there are some things that cannot be done with the Designer, and require you to work with RibbonX. We can hope that, in future versions, the Ribbon Designer will wrap up more of the Ribbon XML capabilities...

    Cindy Meister, VSTO/Word MVP
    Thursday, December 11, 2008 7:41 AM
  • To be honest Cindy I would prefer that they work on getting the core functionality up to scratch before worrying too much about the designer. There are a number of restrictions that make creating a ribbon that matches the fidelity of host application virtually impossible. I have posted some requests on connect under the heading "FEATURE REQUEST: Extended ribbon functionality"

    1. Ability to define horizontal and vertical containers for use within a ribbon group. It is currently not possible to create a group of controls which replicate the layout of the Font group on the Home menu of Word. To do this you would need to group several controls in a horizontal container on a "row" rather than working with the default vertical layout.

    2. Ability to control the space between controls. Again this is a fidelity issue. The default spacing is not consistent with the host application menus. This should include the ability to create 2 rows of standard buttons in a group with equal spaces top, middle and bottom consistent with the Font group on the Home menu in Word.

    3. Improved gallery. It should be possible to create a gallery which replicates the functionality found in the "Styles" group on the home menu of Word.

    4. Ability to embed .Net controls within the menu. I am thinking specifically within the drop down associated with a splitter button. This would allow developers to create custom controls which are outside the scope of a general purpose api.

    5. Color selector. This could be coded using the .Net control embedding listed above but I suspect this would be a very commonly requested feature.


    If anyone reading this post would also like to see this functionality please take the time to rate the connect entry at:

    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=387453

    Andrew Wiles www.it-workplace.com MDX made simple
    Thursday, December 11, 2008 7:54 AM
  • Hi Andrew


    To be honest Cindy I would prefer that they work on getting the core functionality up to scratch before worrying too much about the designer. There are a number of restrictions that make creating a ribbon that matches the fidelity of host application virtually impossible. I have posted some requests on connect under the heading "FEATURE REQUEST: Extended ribbon functionality"


    You are not alone in this :-) However, most of what you want is controlled not by the VSTO team, but the Office UI team. Totally unrelated group. VSTO is basically a "consumer" of that the UI team provides. The VSTO team "wraps" the Ribbon XML so that you can use it in a more "developer-friendly" manner, but they can't add things to the basic Ribbon XML that don't exist.

    1. Ability to define horizontal and vertical containers for use within a ribbon group. It is currently not possible to create a group of controls which replicate the layout of the Font group on the Home menu of Word. To do this you would need to group several controls in a horizontal container on a "row" rather than working with the default vertical layout.

    I'm not quite clear on this point. Are you aware of the box and buttongroup elements you could use to force a line of controls horizontally? If yes, and that doesn't help, you should mention this in your "spec" and explain where these fail.

    FWIW, having access to the internal sizing algorithm Office uses for groups and controls is something that's often requested. You might want to do a little quiet lobbying in some of the Office programming newsgroups you'll find listed in Please Read First for your connect issue. However, you do need to be aware that the best the Visual Studio folks on Connect can do is pass this along to the Office UI team (who have no official way for you to make suggestions).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Andrew Wiles Thursday, December 11, 2008 9:10 AM
    Thursday, December 11, 2008 9:01 AM
  • Cindy

    I was not aware of box - thank you - this at least solves part of the problem I am having.

    Not sure how I missed that but there you go......

    Andrew Wiles - www.it-workplace.com - MDX made simple
    Thursday, December 11, 2008 9:10 AM