none
Hide a builtin gallery in Word 2007 Ribbon RRS feed

  • Question

  • Hi all,

    I am trying to hide or disable the gallery controls in the Paragraph group. However, it doesn't seem to work to change either the visible or enabled property.

    If I add the builtin gallery to a custom tab, it works fine. How can I hide or disable these controls in the Paragraph group?

    In the following example, the gallery in the new tab Test gets disabled, but in the builtin tab Home, group Paragraph, it's not changed at all. Any pointers?

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="rxIRibbonUI_Onload">
    
     <ribbon> 
      <tabs>
    
       <tab id="rxTabTest" label="Test" insertAfterMso="TabHome">
        <group id="rxgrpTest" label="Test">
         <gallery idMso="BulletsGalleryWord" enabled="false"/>
        </group>
       </tab>
    
       <tab idMso="TabHome">
        <group idMso="GroupParagraph" >
         <gallery idMso="BulletsGalleryWord" enabled="false"/>
        </group>
       </tab>
    
      </tabs>
     </ribbon>
    
    </customUI>
    Sunday, April 10, 2011 11:16 AM

Answers

  • Hi Bessie,

    Thanks for this. Is it also possible to hide the gallery instead of disable it?

    All the best,
    Astrid


    Hi Astrid

    No, a visible attribute is not provided. Most likely, this is because changing what's visible in the Ribbon is contrary to the original philosophy behind the Ribbon (the user expects to always find things in the same place).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by AstridZ Tuesday, April 12, 2011 10:36 PM
    Tuesday, April 12, 2011 7:04 AM
    Moderator

All replies

  • Hello AstridZ,

    Thanks for posting. We could use enabled property in <command> element to disable a built-in control. For this issue, please see the sample below,

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="Ribbon_Load" loadImage="GetImage">
      <commands>
           <command idMso="BulletsGalleryWord" enabled="false"/>
      </commands>
      <ribbon>
        <tabs>
          <tab id="rxTabTest" label="Test" insertAfterMso="TabHome">
            <group id="rxgrpTest" label="Test">
              <gallery idMso="BulletsGalleryWord" enabled="false"/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    </customUI>

    If you have any concern on this post, just feel free to follow up. Have a nice day.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 11, 2011 3:50 AM
  • Hi Bessie,

    Thanks for this. Is it also possible to hide the gallery instead of disable it?

    All the best,
    Astrid

    Monday, April 11, 2011 10:17 AM
  • Hi Bessie,

    Thanks for this. Is it also possible to hide the gallery instead of disable it?

    All the best,
    Astrid


    Hi Astrid

    No, a visible attribute is not provided. Most likely, this is because changing what's visible in the Ribbon is contrary to the original philosophy behind the Ribbon (the user expects to always find things in the same place).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by AstridZ Tuesday, April 12, 2011 10:36 PM
    Tuesday, April 12, 2011 7:04 AM
    Moderator
  • Hi Cindy,

    Thanks, I already was afraid that might be the case so I started rebuilding the GroupParagraph. This of course, raises new questions .. ;-)
    Anyway, good to know for sure. Thanks!

    All the best,
    Astrid

    Tuesday, April 12, 2011 10:40 PM