The majority of the controls can have an image associated with them.
The choice of image and display style is controlled by the following attributes:
The majority of the controls can have an image associated with them
The choice of image and display style is controlled by the following attributes
Images that are full-color (24 bit) that also have an alpha channel to control the transparency that are saved in .png format (Portable Network Graphic) work best.
imgImageControl.Picture = Application.Commandbars.GetImageMso("sid, 16, 16)
|image||Used when you want to provide a custom image|
|imageMso||Used when you want to use one of the built-in icons|
|getImage||Used when you want to change a custom controls image while you application is running.|
|showImage||Controls whether an image is displayed or not|
|showItemImage||Controls whether an image is displayed for a dropDown, comboBox or gallery item.|
|size||normal takes up 1 row|
large takes up 3 rows.
Loading Images Dynamically
There are two ways to load images dynamically:
In the root node of your customisation there is a callback attribute called loadImage
This is used in conjunction with the 'image' attribute on individual controls.
The callback attribute 'loadImage' is called everytime the Ribbon asks for an image.
This allows you to define one image handler for the entire application.
<item id="??" image="MyImage.jpg"/>
Public Sub OnLoadImage(ByVal sImageName As String, _
ByRef Image As Variant)
SetImage = LoadPicture("C:\Temp\" & sImageName)
A number of controls provide a getImage callback
We need to create a database table of information related to the images ?
© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext