Author Topic: -RESOLVED- Hidden Toolbox Icon  (Read 3462 times)

Shemuel

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
  • Oh, hi there.
    • View Profile
-RESOLVED- Hidden Toolbox Icon
« on: July 18, 2011, 11:11:31 pm »
Hello,

I'm working on a custom toolbox, which is imagesOnly and thus icons are fairly important. One of the buttons I have (I will refer to it as The Button leads to a hidden ToolboxPage. The icons within that page work fine. However, the icon on the main ToolboxPage for The Button itself is overridden by a folder icon, instead of the image I assigned.

I want The Button to have an icon image I have made that represents the options presented in the hidden page. Is it possible to change this?

Thanks,
Sam
« Last Edit: July 21, 2011, 02:36:09 am by SamER »
Using EA 9.0.908 System Engineering Edition.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Hidden Toolbox Icon
« Reply #1 on: July 20, 2011, 10:41:11 am »
It certainly can be made to work: check out the BPMN toolbox where Start Event, Intermediate Event and End Event all lead to hidden toolbox pages and have custom icons.

The hidden toolbox page must be a «stereotype» class with the exact same name as the attribute in the calling toolbox page, it must extend «metaclass»ToolboxPage and «metaclass»ToolboxItemImage, it must have an attribute "isHidden" with initial value set to "true" and it must have an attribute "Icon" with initial value set to the full pathname of the 16x16 bitmap file.

One final thing I notice from looking at the source diagram for the BPMN toolbox profile: the name of the stereotype class and its matching attribute are prefixed with the technology name (BPMN1.1::StartEvent). That may or may not be important, but I have vague memories that it might be.

After you've checked out all those things, if you still can't get it working then pop a bug report in to Sparx Support with your technology file attached and someone will have a closer look...
The Sparx Team
[email protected]

Shemuel

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
  • Oh, hi there.
    • View Profile
Re: Hidden Toolbox Icon
« Reply #2 on: July 21, 2011, 02:34:55 am »
Aha!

The problem was that I had a two separate stereotypes (with the same name). One was extending ToolboxItemImage with only the icon attribute, and the other was extending ToolboxPage with all the other attributes. Edit: this also explains why at one point when I saved the profile the icon correct but the button did nothing, based on the ordering of the elements!

By combining all the attributes into a single stereotype that extended both of the metaclasses it worked!

Thanks a lot!
Sam
« Last Edit: July 21, 2011, 02:38:43 am by SamER »
Using EA 9.0.908 System Engineering Edition.