Adding icons to the template manager

Jan Holesovsky kendy at suse.cz
Mon Nov 12 05:14:32 PST 2012


Hi Alex,

Alexander Wilms píše v Po 12. 11. 2012 v 07:51 +0100:

> I want to add some icons to the toolbar in the new template manager
> (/sfx2/source/doc/templatedlg.src)
> 
> I added lines like
> 
>                 ButtonImage = Image
>                 {
>                  ImageBitmap = Bitmap { File = "document_edit.png" ; };
>                 };
> 
> for each ToolBoxItem, but when trying to compile I get this error:
> 
> ImageBitmap = Bitmap { File = "document_edit.png" ; };
> ^
> f643:
> "/home/alexander/libo/workdir/unxlngx6.pro/SrsPartMergeTarget/sfx2/source/doc/templatedlg.src",
> line 282: Error in the object (Type: ToolBoxItem):
> The variable <ButtonImage> must not be used here.

The ToolBoxItems cannot contain ButtonImages.  If you want to add a
icons to a 'ToolBoxItem', you need to do it like it is visible in eg.

sd/source/ui/dlg/navigatr.src

Ie. first create the ToolBoxItems, and then later, create an ImageList.
The images there have to have names like "something01.png",
"something02.png", etc.   The "something" part is controlled by the
"Prefix" in the ImageList, the number is given by the IdList.

Hopefully this works for you, please let me know if not.

All the best,
Kendy



More information about the LibreOffice mailing list