none
Gallery Item label alignment RRS feed

  • Question

  • Hi,

    I am creating a gallery of items in office 2007 ribbon. I have created the ribbon and gallery items but the label of items are coming at the right side. I need all the labels of the items centered aligned (Black one text on image). Please have a look at the image.

    Please, provide your updates asap.

    Thanks

    Shahab Abbasi


    Shahab Abbasi

    Wednesday, July 25, 2012 8:43 AM

Answers

  • Hi Shahab,

    Thanks for posting in the MSDN Forum.

    Based on my experience, none of attributes of gallery control can be used for the item alignment. Please refer to this http://msdn.microsoft.com/en-us/library/aa338199(v=office.12). However, I would recommend you try to make the label in center by setting the itemHeight and itemWidth attributes to the appreciate values.

    Hope this can give you an assistance to resolve your issue.

    Best Regards,


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, July 30, 2012 5:57 AM
    Moderator

All replies

  • Please provide the xml definition of your gallery control.

    Cindy Meister, VSTO/Word MVP

    Wednesday, July 25, 2012 9:32 AM
    Moderator
  • Here is the xml definition:

    <gallery id="gallery" columns="3" rows="2" image="SingleTable" onAction="galleryOnAction" size="large" getLabel="GetLabel" getEnabled="GetEnabled"
                      getScreentip="GetScreenTip" supertip="This is the super tip." getKeytip="GetKeyTip" getItemCount="GetItemCount"
                      getItemHeight="GetItemHeight"
                      getItemWidth="GetItemWidth" getItemImage="GetItemImage"
                      getItemScreentip="GetItemScreenTip"
                      getItemSupertip="GetItemSuperTip" getItemLabel="getItemLabel">
                <item id="item1" />
                <item id="item2" />
                <item id="item3" />
                <item id="item4" />
                <item id="item5" />
                <item id="item6" />
              </gallery>

    Shahab Abbasi

    Wednesday, July 25, 2012 10:29 AM
  • Hi Shahab,

    Thanks for posting in the MSDN Forum.

    Based on my experience, none of attributes of gallery control can be used for the item alignment. Please refer to this http://msdn.microsoft.com/en-us/library/aa338199(v=office.12). However, I would recommend you try to make the label in center by setting the itemHeight and itemWidth attributes to the appreciate values.

    Hope this can give you an assistance to resolve your issue.

    Best Regards,


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, July 30, 2012 5:57 AM
    Moderator