MS Access 2007 Load Image to Ribbon

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 16:14:31

问题


I'm trying to get to grips with customising a Ribbon Bar for a converted A2003 app. I'm trying to work out how to use my own custom images on button controls in the ribbon. Can anyone point me to an example for Access 2007 that can do this pls?


回答1:


Please check this MSDN article (Adding Custom Dynamic Menus to the Office Fluent User Interface) and see if it helps you. Furthermore I would point you to the specifying image resource MSDN article, because you need different sized images for different sized buttons - read the bottom of my post to make it easier on you.

I believe there was also custom images within the official MS example on ribbon extensibility with Access 2007 - I hope this example is sufficient, it helped me a great lot.

My personal favorite is just using a graphical UI editor, such as the "Custom UI Editor Tool". With it you just click a button to insert an image and it works (as explained in this tutorial). Even better as the Custom UI Editor is the IDBE Ribbon Creatror - my personal tool of choice. A shareware version is available from the website.




回答2:


I have a working example class object you can use that makes this a good deal less code.

http://www.members.shaw.ca/albertKallal/Ribbon/ribbon.htm

The above lets you use a very much like previous style code approach. So, to set a picture for a ribbon, you can go:

meRib("Button1").Picture = "HappyFace.png"

The same download has a working form in which some images in the ribbon change from choices made on the form.



来源:https://stackoverflow.com/questions/3868758/ms-access-2007-load-image-to-ribbon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!