Grafe Libao
Posts: 1
Joined: 2021-10-12
|
We have a COM Add-In for Excel and currently using TadxRibbonTab
When using XLA, we normally do this using getImage='GetImage' and assign the image using IPictureDisp.
Does Add-in Express support the same method? How? Do you have a sample?
Edit: I know how to use Glyph. What we need however it to assign the image dynamically, as the image file names will depend on some logic.
Thanks |
|
Andrei Smolin
Add-in Express team
Posts: 18616
Joined: 2006-05-11
|
Hello Grafe,
Simply setting the Glyph property at the run time should work. This is what Add-in Express does when you do this:
procedure TadxRibbonCustomControl.SetGlyph(Value: TBitmap);
begin
FGlyph.Assign(Value);
Invalidate;
if Self is TadxRibbonItem then begin
if TAccessCollection(Self.Collection).GetOwner is TadxRibbonDropDown then
TadxRibbonDropDown(TAccessCollection(Self.Collection).GetOwner).Invalidate;
end;
end;
The Invalidate call invalidates the corresponding control and this makes Office invoke the corresponding callbacks thus refreshing the image.
Andrei Smolin
Add-in Express Team Leader |
|