none
Ribbon Question RRS feed

  • Question

  • I have created a custon ribbon for my template (Word 2010). For my buttons size I am using "large".  I have a group buttons and when you click on one of them all the buttons tied to it open. My question is when you put your curser over the group button instead of the screentip displaying, the buttons ties to that group open without clicking on the gruop button?
    Sunday, September 2, 2012 7:53 PM

Answers

  • Hi fuzzhead

    Normally, all buttons of a group would be displayed. The only time this would not be the case is when there's not enough room in the application window to display them all. Then they're "condensed".

    The default behavior for condensing (the one available for Office 2007 Ribbon customizations) is not very flexible. An attribute was introduced for Office 2010 that lets Groups condense more "gracefully", similar to how the Microsoft Ribbon groups condense: aAutoScale = "true"

    But once the buttons have been condensed to a splitButton-type of dropdown list, as appears to be the case from what you describe, there's no provision in the Ribbon design to allow the list to display simply by hovering the mouse over the button. It does require a click.

    If you really, really want this, you could perhaps achieve it through using the Windows API in concert with the Ribbon Accessibility (http://msdn.microsoft.com/en-us/library/bb404170.aspx). But it would definitely be non-trivial, especially if this is VBA and not .NET.


    Cindy Meister, VSTO/Word MVP

    Wednesday, September 5, 2012 5:57 AM
    Moderator
  • Thank you for the information. I did not think it would work in VBA but I thought I would ask.
    • Marked as answer by fuzzhead58 Wednesday, September 5, 2012 7:20 PM
    Wednesday, September 5, 2012 7:20 PM

All replies

  • Hi fuzzhead

    Could you please paste the relevant XML into the Code Editor (second button from the right on the forum toolbar) and insert it into a reply?


    Cindy Meister, VSTO/Word MVP

    Monday, September 3, 2012 9:22 AM
    Moderator
  • Here is my ribbon code:

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <ribbon>
        <tabs>
            <tab id="Tab1" insertBeforeMso="TabHome" label="Procedure Macros">
                <group id="Grp1" label="Symbols" image="Symbol1" screentip="Add  Find  Remove  Symbols" visible="true">
                    <button id="button1" screentip="Add Bell Symbol" showLabel="false"
                    size="large" image="Bellp"
                    onAction="CustRibbonBtn" />
                    <button id="button2" screentip="Add Dollar Symbol" showLabel="false"
                    size="large" image="DSp"
                    onAction="CustRibbonBtn" />
                    <button id="button3" screentip="Add Pound Symbol" showLabel="false"
                    size="large" image="PSIGNp"
                    onAction="CustRibbonBtn" />
                    <button id="button4" screentip="Add 2H Symbol" showLabel="false"
                    size="large" image="TWOHsp"
                    onAction="CustRibbonBtn" />
                    <button id="button5" screentip="Add Star Symbol" showLabel="false"
                    size="large" image="STARSp"
                    onAction="CustRibbonBtn" />
                    <button id="button60" screentip="Critical Step Stamp" showLabel="false"
                    size="large" image="CSSp"
                    onAction="CustRibbonBtn" />
                <separator id="Grp1Sep1" />
                    <button id="button6" screentip="Delete all Bell Symbols" showLabel="false"
                    size="large" image="DBELLp"
                    onAction="CustRibbonBtn" />
                    <button id="button7" screentip="Delete all Dollar Symbols" showLabel="false"
                    size="large" image="DDSp"
                    onAction="CustRibbonBtn" />
                    <button id="button8" screentip="Delete all Pound Symbols" showLabel="false"
                    size="large" image="DPSIGNp"
                    onAction="CustRibbonBtn" />
                    <button id="button9" screentip="Delete all 2H Symbols" showLabel="false"
                    size="large" image="D2HSp"
                    onAction="CustRibbonBtn" />
                    <button id="button10" screentip="Delete all Star Symbols" showLabel="false"
                    size="large" image="DSTARSp"
                    onAction="CustRibbonBtn" />
                    <button id="button79" screentip="Delete all Critical Step Symbols" showLabel="false"
                    size="large" image="DCSSp"
                    onAction="CustRibbonBtn" />
                <separator id="Grp1Sep2" />
                    <button id="button67" screentip="Find Bell Symbol" showLabel="false"
                    size="large" image="FBellp"
                    onAction="CustRibbonBtn" />
                    <button id="button68" screentip="Find Dollar Symbol" showLabel="false"
                    size="large" image="FDSp"
                    onAction="CustRibbonBtn" />
                    <button id="button69" screentip="Find Pound Symbol" showLabel="false"
                    size="large" image="FPSIGNp"
                    onAction="CustRibbonBtn" />
                    <button id="button70" screentip="Find 2H Symbol" showLabel="false"
                    size="large" image="F2HSp"
                    onAction="CustRibbonBtn" />
                    <button id="button71" screentip="Find Star Symbol" showLabel="false"
                    size="large" image="FSTARSp"
                    onAction="CustRibbonBtn" />
                    <button id="button72" screentip="Find Critical Step Symbol" showLabel="false"
                    size="large" image="FCSSp"
                    onAction="CustRibbonBtn" />
                <separator id="Grp1Sep3" />
                    <button id="button11" screentip="Add PCN Symbol" showLabel="false"
                    size="large" image="PCNp"
                    onAction="CustRibbonBtn" />
                    <button id="button12" screentip="Delete all PCN Symbol" showLabel="false"
                    size="large" image="DPCNp"
                    onAction="CustRibbonBtn" />
                    <button id="button13" screentip="Find PCN Symbol" showLabel="false"
                    size="large" image="FPCNp"
                    onAction="CustRibbonBtn" />
                </group >

    Tuesday, September 4, 2012 12:08 AM
  • Hi fuzzhead

    I was hoping that, looking at your XML, I'd be able to better understand your question. But I'm afraid it hasn't helped...

    Of course, I have neither your images, nor your onAction macros, so I can't do a complete test. It's easy enough to remove the images so that I can see your Ribbon in a document. When I hover the mouse over a button, only that button is "active". And when I click the button (with no macro attached) only that button is "clicked".

    The way I understand your first message, you're saying that clicking one button clicks ALL the buttons? Is that what you want to say?

    In that case, the problem would have to be in your macros, which all refer to the same macro: CustRibbonBtn. So I think the problem is with your macro? Could you show us that?


    Cindy Meister, VSTO/Word MVP

    Tuesday, September 4, 2012 10:25 AM
    Moderator
  • I am sorry it is taking time to answer back but I am having problems with my internet connection. My question is when I hover over one of my ribbon buttons all I get is my screentip. I want to know can I make it open the group buttons by hovering over the main ribbon button? I have to click on my ribbon button to get the sub buttons to display right now.
    Tuesday, September 4, 2012 10:04 PM
  • Hi fuzzhead

    Normally, all buttons of a group would be displayed. The only time this would not be the case is when there's not enough room in the application window to display them all. Then they're "condensed".

    The default behavior for condensing (the one available for Office 2007 Ribbon customizations) is not very flexible. An attribute was introduced for Office 2010 that lets Groups condense more "gracefully", similar to how the Microsoft Ribbon groups condense: aAutoScale = "true"

    But once the buttons have been condensed to a splitButton-type of dropdown list, as appears to be the case from what you describe, there's no provision in the Ribbon design to allow the list to display simply by hovering the mouse over the button. It does require a click.

    If you really, really want this, you could perhaps achieve it through using the Windows API in concert with the Ribbon Accessibility (http://msdn.microsoft.com/en-us/library/bb404170.aspx). But it would definitely be non-trivial, especially if this is VBA and not .NET.


    Cindy Meister, VSTO/Word MVP

    Wednesday, September 5, 2012 5:57 AM
    Moderator
  • Thank you for the information. I did not think it would work in VBA but I thought I would ask.
    • Marked as answer by fuzzhead58 Wednesday, September 5, 2012 7:20 PM
    Wednesday, September 5, 2012 7:20 PM