PDA

View Full Version : Custom image for shared Add-in ribbon doesn't show.



gabethegrape
05-08-2009, 05:31 PM
Hello,
I've got my Excel ribbon tab to the point where a second xlam appears within the drop down menu of the first using the following XML for both. However, the image does not appear when I change menu id to idQ. If I change the idQ back to id, or if I change custom image to imageMso, it works fine. Basically, I'm trying to add (x) number of add-ins to a dropdown menu within my custom tab. Is there a better way to do this so that I can use my custom image?

First Add-in:



<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:x="myNameSpace">

<ribbon>
<tabs>
<tab idQ="x:GabeTab" label="RehabCalcs" insertAfterMso="Add-Ins">

<group id="customGroup1" label="Prescription">
<button id="customButton1" size="large" onAction="OpenCalc" image="Rx2" />
</group>

<group idQ="x:customGroup2" label="Exercises">
<menu idQ="x:MyDropdownMenu" size="large" image="Ex2" >
<button id="customButton2" label="Postures" onAction="Postures" />
</menu>
</group>

<group idQ="x:customGroup3" label="Assessment">
<menu idQ="x:MyDropdownMenu2" size="large" image="Ax2" >
<button id="customButton3" label="Ax1Button" onAction="Macro1" />
</menu>
</group>

</tab>
</tabs>
</ribbon>

Second Add-in:



<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:x="myNameSpace">

<ribbon>
<tabs>
<tab idQ="x:GabeTab" label="RehabCalcs" insertAfterMso="Add-Ins">

<group idQ="x:customGroup2" label="Exercises">
<menu idQ="x:MyDropdownMenu" size="large" image="Ex2" >
<button id="customButton4" label="Two" onAction="Postures2" />
</menu>
</group>

<group idQ="x:customGroup3" label="Assessment">
<menu idQ="x:MyDropdownMenu2" size="large" image="Ax2" >
<button id="customButton5" label="Yup" onAction="Macro2" />
</menu>
</group>

</tab>
</tabs>
</ribbon>
</customUI>

Thanks for your help.
Gabe

gabethegrape
05-10-2009, 12:56 AM
In case anyone is interested in the solution (got no help here), you need to use splitButton and it will display your custom shared image.

Here is the code:



<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:x="myNameSpace">

<ribbon>
<tabs>
<tab idQ="x:GabeTab" label="RehabCalcs" insertAfterMso="Add-Ins">
<group idQ="x:customGroup4" label="RehabCalcs">
<splitButton idQ="x:mySplitButton" size="large">
<button id="customButton13" image="Ax2" label="Assessments" />
<menu idQ="x:splitMenu" itemSize="normal">
<!-- use itemSize = large or use normal -->
<button id="customButton14" onAction="Macro14" label="Grip Strength/Effort"/>
</menu>
</splitButton>
<splitButton idQ="x:mySplitButton2" size="large">
<button id="customButton15" image="Ex2" label="Exercises" />
<menu idQ="x:splitMenu" itemSize="normal">
<!-- use itemSize = large or use normal -->
<button id="customButton16" onAction="Postures" label="Postures"/>
</menu>
</splitButton>
<splitButton idQ="x:mySplitButton3" size="large">
<button id="customButton17" image="Rx2" label="Prescription" />
<menu idQ="x:splitMenu" itemSize="normal">
<!-- use itemSize = large or use normal -->
<button id="customButton18" onAction="OpenCalc" label="Xcalc"/>
</menu>
</splitButton>
</group>

</tab>
</tabs>
</ribbon>
</customUI>

Ken Puls
05-11-2009, 09:26 PM
In case anyone is interested in the solution (got no help here)

I'm sorry, but this really picks me. You posted at 5:30PM on a Friday and answered the question on... what... Sunday?

You're asking a question that is not exactly a run of the mill question, to be honest. There are few playing with the Ribbon yet, and even fewer trying to work with shared namespaces. To expect this answered on a weekend might be expecting a bit too much.

The people that make this forum run are all volunteers. We're not paid a dime to help you do your work. If you want a solution right now, pay someone for it.

Many of us have solved our own issues before someone else, but I'm hard pressed of any of our regulars that have come back and posted a gripe about it.

Even worse, I see that you cross posted this and didn't bother to advise anyone. What if Steve over at pschmid.net (http://www.pschmid.net/office2007/forums/viewtopic.php?t=496) was actively working on this? How do you think he'd feel knowing that you had someone else working on it at the same time?

gabethegrape
05-11-2009, 10:34 PM
You're right. I had to re-read my post to figure out why you got so upset. I meant no offense. I'm just very impatient. I'm also deeply appreciative of the support I get here.