none
How to assign a conflicting keytip to a control in Microsoft Office? RRS feed

  • Question

  • I tried assigning "G" as a keytip to my control but the Microsoft Office is changing it to "Ysomething". How can I force the Microsoft Office to use my assigned keytip? Or is there any work around to make this work?
    Wednesday, September 14, 2016 12:17 PM

Answers

  • Hello Amiel,

    It works like a charm on my machine with Word 2013 installed.

    Where and when do you set the key tip? Did you try to use Ribbon XML?


    [custom.development]

    Wednesday, September 14, 2016 6:10 PM
  • It also works on my computers both Offcie2013 and Office2016. And both Ribbon(designer) and Ribbon(XML)

    In Ribbon Designer, I am using

            private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
            {
                button9.KeyTip = "G";
            }

    In  Ribbon(XML), I am using

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
      <ribbon>
        <tabs>
          <tab idMso="TabAddIns">
            <group id="MyGroup"
                   label="My Group">
              <button id="test" keytip ="G" label ="test" onAction ="test"/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    </customUI>

     

    Besides, you need to use keytip X (I assign to a button in TabAddIns) to switch into the tab, then you could succeed in using G to call the control.


    Thursday, September 15, 2016 10:02 AM
    Moderator

All replies

  • Hello Amiel,

    It works like a charm on my machine with Word 2013 installed.

    Where and when do you set the key tip? Did you try to use Ribbon XML?


    [custom.development]

    Wednesday, September 14, 2016 6:10 PM
  • It also works on my computers both Offcie2013 and Office2016. And both Ribbon(designer) and Ribbon(XML)

    In Ribbon Designer, I am using

            private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
            {
                button9.KeyTip = "G";
            }

    In  Ribbon(XML), I am using

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
      <ribbon>
        <tabs>
          <tab idMso="TabAddIns">
            <group id="MyGroup"
                   label="My Group">
              <button id="test" keytip ="G" label ="test" onAction ="test"/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    </customUI>

     

    Besides, you need to use keytip X (I assign to a button in TabAddIns) to switch into the tab, then you could succeed in using G to call the control.


    Thursday, September 15, 2016 10:02 AM
    Moderator