Creating Picture for a CommandBarPopup

M

Michael Hlavinka

How do you assign a picture for a CommandBarPopup. I
know how to make the assignment for a CommandBarButton
but not a CommandBarPopup.

I have a toolbar in which I'm adding a control for a
custom action of type msoControlPopup. I can
successfully add the popup to the toolbar and command bar
buttons to the popup. However, I'd like to assign a
picture to the popup on the toolbar rather than having
the caption text displayed due to its length.

A CommandBarPopup apparently is not a CommandBarButton
because a QI fails. This prevents the Picture property
of the CommandBarButton from being used.

How can this be done?

Thanks,

Michael
 
W

Wei-Dong Xu [MSFT]

Hi Michael,

Thank you for posting in MSDN managed newsgroup!

From my understanding to this issue, you have successfully created one commandbarPopup control and then you are going to add the icon to the
menu subitem of the commandbarpopup.

If so, I¡¯d suggest one kb article regarding this topic will hellp you a lot. This article contains the sample code for you to create one commandbarpopup
menu with icons. Please go to:
Custom Button Faces in a Managed Code Add-in for the Microsoft Office System
http://msdn.microsoft.com/library/d...y/en-us/dno2k3ta/html/odc_customfaces_net.asp

Please feel free to let me know if you have any further questions.

Does this answer your question? Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Michael Hlavinka

No that's not what I'm looking for. That shows how to
assign a picture to a submenu item (which I have already
done). I want to know how to assign a picture to the
popup itself. The popup itself is anchored in the
toolbar, not the submenu items. The submenu items only
display when the popup is clicked. Without being able to
assign a picture to the popup in the toolbar, the caption
text consumes too much space of the toolbar.

Michael
-----Original Message-----
Hi Michael,

Thank you for posting in MSDN managed newsgroup!

From my understanding to this issue, you have
successfully created one commandbarPopup control and then
you are going to add the icon to the
menu subitem of the commandbarpopup.

If so, I¡¯d suggest one kb article regarding this topic
will hellp you a lot. This article contains the sample
code for you to create one commandbarpopup
 
W

Wei-Dong Xu [MSFT]

Hi Michael,

Thank you for replying and more information about this issue!

So far as I know, the popup object itself doesn't have the property to set the icon. This is to say, we can't specify one icon for the popup itself.

Please feel free to let me know if you have any further questions.

Does this answer your question? Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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