Creating gallery in dynamic menu

J

Josh Sale

I'm trying to create a dynamic gallery control within a dynamic menu item in
my XL2007 ribbon tab. What I'm trying to create is something that looks
like Excel's Format as Table or Cell Styles controls on the Home tab. That
is, when the control is activated I want a menu with separators and then I
want a single gallery control within following each separator that shows the
gallery images.

In my experimentation the closest I can get to this is something that looks
like the Conditional Formatting control. That is menu separators with menu
entries that then expand to the gallery.

I can get the desired appearance in my menu if I substitute button controls
for the gallery items ... but button controls don't give me the
functionality I want. In particular I want decent size images that I can
control using the itemHeight and itemWidth attributes.

The way I'm doing this is I've added a single dynamicMenu control to my
custom tab that has a getContent that points to a routine that I've written
to generate the XML.

This routine generates:

- The schema header.
- A menu separator
- A gallery control which itself is defined using getItemCount, getItemID,
etc.
- The needed XML closure tags.

The middle two steps are repeated as necessary based on external data.

I've tried generating the gallery control with and without a Label attribute
thinking the lack of a label or a top level image might cause the generated
ribbon entries to be pulled inline to the menu but no joy.

Anybody got any suggestions?

TIA,

josh
 

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