none
Ribbon XML for Excel and visibilzty of menu entries RRS feed

  • Question

  • Hello,

    in my Ribbon.XML I have

              <splitButton id="RibbonsbPasteSubset" size="normal" keytip="T">
                <button
                id="RibbonbtnPasteSubset"
                getLabel="GetLabelProxy"
                onAction="ClickProxy"
                getImage="GetImage"
                getEnabled="GetWBPresent"
                keytip="T1"
                getSupertip="GetSupertipProxy"
                getScreentip="GetScreentipProxy"/>
                <menu id="RibbonbtnPasteSubsetMenu">
                  <button
                    id="RibbonbtnPasteSubsetOld"
                    getLabel="GetLabelProxy"
                    onAction="ClickProxy"
                    getEnabled="GetWebSubsetEnabled"
                    getVisible="GetWebSubsetVisible"
                    keytip="T2"
                    getSupertip="GetSupertipProxy"
                    getScreentip="GetScreentipProxy"/>
                </menu>
              </splitButton>
    

    But even if GetWebSubsetVisible returns false I see the menu arrow and if I select this arrow I see an empty subentry.

    I tried to change the menu entry to

     <menu id="RibbonbtnPasteSubsetMenu" getVisible="GetWebSubsetVisible">

    nthen not only the menu arrow is invisible, but also the button declared above with

    id="RibbonbtnPasteSubset"

    And if I change getVisible to getEnabled then for the menu then also the button with id RibbonbtnPasteSubset is disabled.

    So how can I make the menu invisble without making the button with id RibbonbtnPasteSubse invisble.

    tia

      Hendrik Schmieder

    Monday, October 29, 2018 3:42 PM

All replies

  • Hi h_schmieder,

    Do you mean that the button "Ribbonsbpastesubset" is not visible after changing "getvisible" to "getenable" on the button "ribbonbtnpastesubsetold"? 

    Best Regards,

    Bruce


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.


    Tuesday, October 30, 2018 10:32 AM
    Moderator
  • Attention:

    there's an id "Ribbonsbpastesubset" and an id "Ribbonbpastesubset".

    They differ just in the 's' after 'Ribbon'.

    I mean the button with the id without 's' after 'Ribbon.

    In my testcase the callbacks

    GetWebSubsetEnabled

    and

    GetWebSubsetVisible

    always return false

    In case

    <menu id="RibbonbtnPasteSubsetMenu" getVisible="GetWebSubsetVisible">

    nothing of the splitbuuton is visible.

    In case

    <menu id="RibbonbtnPasteSubsetMenu" getEnabled="GetWebSubsetEnable">

    The button with id "Ribbonbpastesubset" ( the one without s) is visible but disabled,

    although the callback GetWBPresent returns true.

    with best regards

      Hendrik Schmieder

    Tuesday, October 30, 2018 1:06 PM
  • Hi h_schmieder,

    If getLabel attribute is removed, will the button be enabled? 

    You can modify/test button properties such as add tag with id "Ribbonbpastesubset" on the button tag to see whether the disable state will change on the button.

    Best Regards,
    Bruce

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Wednesday, October 31, 2018 5:22 AM
    Moderator
  • Sorry for the delay:

    In my Ribbon.XML I have currently

              <splitButton id="RibbonsbPasteSubset" size="normal" keytip="T">
                <button
                id="RibbonbtnPasteSubsetOld"
                getLabel="GetLabelProxy"
                onAction="ClickProxy"
                getImage="GetImage"
                getEnabled="GetWBPresent"
                keytip="T1"
                getSupertip="GetSupertipProxy"
                getScreentip="GetScreentipProxy"/>
                <menu>
                  <button
                    id="RibbonbtnPasteSubset"
                    getLabel="GetLabelProxy"
                    onAction="ClickProxy"
                    getEnabled="GetWebSubsetEnabled"
                    getVisible="GetWebSubsetVisible"
                    keytip="T2"
                    getSupertip="GetSupertipProxy"
                    getScreentip="GetScreentipProxy"/>
                </menu>
              </splitButton>

    It doesn't matter whether I remove the first getlabel, the second one or both.

    If I click on the arrow I see an empty space although GetWebSubsetVisible returns false.

    The only change is that there's no text for the button with id RibbonbtnPasteSubsetOld if I remove the first getlabel.


    • Edited by h_schmieder Wednesday, December 5, 2018 2:32 PM
    Wednesday, December 5, 2018 2:31 PM