Author Topic: Creating a custom toolbox icon  (Read 4586 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Creating a custom toolbox icon
« on: October 04, 2013, 07:43:30 am »
I was asked by someone how to create a toolbox icon in a MDG. I thought having done that in the past but could not remember. So I started trying and reading the help. Neither worked :-(

The EA help states
Quote
To set the icon for a toolbox item, locate the item in the Toolbox Items list and click within the Toolbox Icon column. Click on the ellipsis (…) within this column.  The Select a Toolbox Icon dialog displays. Locate the image file and click the Open button
But there is no Toolbox Icon column in the Toolbox Items list. They are plainly displayed as simple attributes - which don't have something like an icon.

Any help available?

q.

philchudley

  • EA User
  • **
  • Posts: 743
  • Karma: +21/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Creating a custom toolbox icon
« Reply #1 on: October 04, 2013, 06:43:21 pm »
Hi

I use the new MDG Profile Helpers in version 10

1) Open the diagram containing the toolbox page
2) Right click on your toolbox page (the one with the attributes) and select Edit with Profile Helper
3) Then on the dialog you should see the toolbox icon column where you can navigate to your icon

Oh by the way, the icon is 16 x 16 and to get an "invisible" background set the background of your icon to RGB (192,192,192) so that it "blends" in with grey of the toolbox

I have found, that using the profile helpers you can set the element image in the UML profile diagram, if this is done, then there is no need to set it again in the toolbox, unless you wish to use a different icon for the project browser and the toolbox.

I shall be demonstrating the mysteries of MDG at next week's European EA User Group meeting in Nuremberg

Cheers

Phil
Models are great!
Correct models are even greater!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Creating a custom toolbox icon
« Reply #2 on: October 05, 2013, 12:05:57 am »
Thanks Phil. That worked :)

It looks like the description refers to exactly this dialog Edit with Profile Helper as this has the mentioned column. I was not reading so carefully but can't remember the help mentioning this dialog. For sure I managed this without the helper in the past. But probably I had to do it with some manual XML editing :-?

q.

[edit] The help is talking about the Helper, but only at the very end in a note. Very confusing that is...
« Last Edit: October 05, 2013, 12:08:21 am by qwerty »

bITs.EA

  • EA User
  • **
  • Posts: 80
  • Karma: +2/-0
    • View Profile
Re: Creating a custom toolbox icon
« Reply #3 on: October 08, 2013, 12:16:09 am »
Hi,

I was the 'someone' who asked the question to qwerty :) This is what I discovered...

The problem was that my *.bmp wasn't in the right format. I've got a program 'Pixelformer' in which I made the bitmaps and when saving the bmp I had to chose a format. Only the format 'A1:R5:G5:B5 (16bpp)' works for EA. This can be tested by importing the images via Settings --> images... . If the image can be imported there, then it will work in the MDG too.
(btw, the background color for icons is wrong in the user guide! You should choose (204,204,204) instead of (192,192,192) to get a transparent background (or at least I had to set it this way in my bitmap creator))

Another problem was that I was working with a hidden toolboxpage (cfr. the toolboxpage 'startevent' in the BPMN2.0 MDG). In that case, you have to add the icon as an attribute to the hidden toolboxpage and don't make a seperate toolboxitemimage like described in the user guide...

Just saying in case you need it :)