gallery getSelectedItemID not working

D

David Thielen

I have the following in my customui.xml:

<gallery columns="3"
id="WR_TAG_GALLERY" getEnabled="IsEditableButtonVisible"
onAction="RxTagGalleryType" getSelectedItemID="RxGetGalleryTagOnId"

image="element_add.png" itemHeight="32" itemWidth="32" label="Tags"
size="large" rows="7"

screentip="Insert or change a tag" supertip="If the caret is not on a
tag, insert this tag type.\nIf the caret is on a tag, change the tag
type.">
<item id="WR_TAG_OUT"
image="note_edit.png" label="Out" screentip="Insert data at this
location." supertip="This can be text, an imported template, or an
image." />

And the code:

public string RxGetGalleryTagOnId(IRibbonControl
control)
{
return "WR_TAG_OUT";
}

This gives me an error. Why?

I also tried returning null & "" (for nothing selected) - it didn't
like those either. How do I tell it nothing is selected?

thanks - dave


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Colbert Zhou [MSFT]

Hello Dave,

I can make it work using the codes similar as yours. Your codes look
correct to me. What is the error it reports? Do you receive that error in
compiler time or runtime?

---------------XML-------------------------
<gallery id="gallery1" label="gallery1" size="large" getSelectedItemID
="GetSelectedItemID">
<item id="WR_TAG_OUT" label="Out" screentip="Insert data at this
location." supertip="This can be text, an imported template, or an image."
/>
<item id="item2" label="Out" screentip="Insert data at this location."
supertip="This can be text, an imported template, or an image." />
<item id="item3" label="Out" screentip="Insert data at this location."
supertip="This can be text, an imported template, or an image." />
</gallery>
-----------------------------------------------

-------------Codes------------------------
public string GetSelectedItemID(Office.IRibbonControl control)
{
return "WR_TAG_OUT";
}
-----------------------------------------------


Best regards,
Ji Zhou
Microsoft Online Community Support
 
D

David Thielen

Hello Dave,

I can make it work using the codes similar as yours. Your codes look
correct to me. What is the error it reports? Do you receive that error in
compiler time or runtime?

---------------XML-------------------------
<gallery id="gallery1" label="gallery1" size="large" getSelectedItemID
="GetSelectedItemID">
<item id="WR_TAG_OUT" label="Out" screentip="Insert data at this
location." supertip="This can be text, an imported template, or an image."
/>
<item id="item2" label="Out" screentip="Insert data at this location."
supertip="This can be text, an imported template, or an image." />
<item id="item3" label="Out" screentip="Insert data at this location."
supertip="This can be text, an imported template, or an image." />
</gallery>
-----------------------------------------------

-------------Codes------------------------
public string GetSelectedItemID(Office.IRibbonControl control)
{
return "WR_TAG_OUT";
}
-----------------------------------------------

And now it's working. But I swear it wasn't before. Oh well...

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top