0

I have developed an Addin where I have mentioned the screentip ans supertip.

I want to change this screentip and supertip based on my customization and for each button mouse hover.

<button id="btn1" keytip="L" Screentip="GetScreentip" supertip="My Button displays form" label="Button1" size="large" showImage="true" image="FirstImage"/>

the code snippet I am planning to use is

 public string GetScreentip(Office.IRibbonControl control)
    {
       switch (control.Id)
       {
           case "btn1": return mobjLanguage.MY_FIRST_BUTTON;
       }

   }

But this is not working, I want to change this based on which language I select and based on the language each

button screentip and supertip has to change for each button!

I am using .net 4.0 c# and implementing addin for Office 2010.

roopini n
  • 503
  • 2
  • 7
  • 29

2 Answers2

0

I think your ribbon doesnt have callback function. It has to be screentip = GetScreentip instead of screentip="myTip"

Kiru
  • 3,489
  • 1
  • 25
  • 46
  • @Kiru- sorry there was a typo which i edited now, how to check this based on the case statement? for each case? and for each button hover? – roopini n Feb 11 '14 at 02:20
  • 1
    Add default: for your switch http://msdn.microsoft.com/en-us/library/06tc147t.aspx – Kiru Feb 11 '14 at 09:41
  • @ kiru- thanks, is it possible to even add the tooltip tag in the Ribbon xml? – roopini n Feb 11 '14 at 10:46
  • 1
    Unfortunately NO. Check this http://stackoverflow.com/questions/6139785/how-to-remove-the-tooltip-press-f1-for-more-help-from-my-word-addin – Kiru Feb 11 '14 at 13:04
0

The screentip property of the XML sets static text. If you want dynamic text, use the getScreentip property which sets the name of the callback function. (screentip and getScreentip are mutually exclusive)

so use getScreentip="GetScreentip"

BTW there are many properties that come in "pairs" - one for statically setting it and one for setting a callback. These include screentip/getScreentip, supertip/getSupertip, enabled/getEnabled, etc.

Brian
  • 21
  • 1