Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Ribbon Button - Image Width Collapse All
Subject Author Date
Benjamin Helbig May 18, 2009 - 11:53 AM

Hi folks,


maybe I haven’t found the option but when I add a button to the ribbon and add a defaultimage to the button I’m not able to change the size of the image. Even the width couldn’t be changed. It seems that the button zooms the image a selected as default image.


Are their any other possibilities to change the image size?


Thanks Ben

Technical Support May 20, 2009 - 5:40 AM

There are two image sizes in ribbon control: small and large. The small is used when a control in the ribbon has a small size or squeezed to a small size when the main form’s width changed. Otherwise the large image is used. So, if you want the button to look nice, you should assign both a small image and a large one to the Control.DefaultSmallImage and ControlDefaultLargeImage properties correspondingly. Because of a potentially large number of different controls the ribbon can contain, it is important that every image in the ribbon has the same small and large image sizes. By default, they are 16x16 and 32x32. You can, of course, assign an image with a greater size to Control.DefaultSmallImage but it will be squeezed to 16x16 anyway.

You can change the global settings for the image sizes with the Ribbon.SmallImageSize and Ribbon.LargeImageSize properties. If you have an image that is smaller than the default size, you may want to enlarge it by simply adding transparent pixels, thereby saving the image quality by preventing it from being zoomed.