Book a Demo

Author Topic: Custom UI Toolbox  (Read 5994 times)

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Custom UI Toolbox
« on: September 08, 2012, 01:15:45 am »
I would like to create a toolbox for my MDG that contains UI elements. I am having trouble getting started. I assume I must start with a metaclass and select GUIElement, but I do not know how to set up the associated stereotypes for each UI elelment, including redefining existing UI elelments in simple or win32 toolboxes  So.....  
1)  How can I include existing elements that are included in three other UI toolboxes into my custom toolbox?
2) What is the best way to create custom (company-specific) UI elements which can display differently depending upon tagged values (like many of the elements in the simple UI toolset do).  

Karl

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Custom UI Toolbox
« Reply #1 on: September 08, 2012, 02:31:49 am »
You can reference elements in as many toolboxes as you want just like in the first. To create images depending on tags you have to write shape scripts. Therefore you need to create an attribute named _image.

q.

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Custom UI Toolbox
« Reply #2 on: September 08, 2012, 03:03:48 am »
For question 1, my issue is not referencing the same stereotype multiple times in my toolbox profile diagram,  but how do I initially create a stereotype in my profile diagram that is essentially an element from one of the EA existing IT toolboxes. At the moment I am thinking that I cannot do it.  

Thanks for the tip about using shape scripts. That is what I was thinking.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Custom UI Toolbox
« Reply #3 on: September 08, 2012, 04:50:53 am »
EA element are based on different Sparx owned profiles. You need to figure out what the profile name is. There were also some limitations in re-using them in other profiles but at the moment I don't remember which. There's a thread somewhere in the stomach of this YABB but likely hard to find it...

q.

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Custom UI Toolbox
« Reply #4 on: September 08, 2012, 07:20:39 am »
Thanks.  
Was able to "pull" an element from each of the 3 UI toolboxes into my custom MDG toolbox.  Actually was rather easy.  Just looked at an XML containing the elements that I wanted could see the profile name and element name which I then used in my toolbox stereotype. For example, here is an element from each of the three UI profiles:
EAUI::list
simpleIU::simpleButton
win32UI::win32ScrollBarV

Karl

carolin.boeckler

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Custom UI Toolbox
« Reply #5 on: October 19, 2012, 09:32:24 pm »
Hello

I also tried to import other elements to my toolbar. The only problem I have is that I cannot see the right icon on the toolbar. I imported win32UI::win32ScrollBarV and some other elements of win32UI.
Do you have the same problem? Or did I something wrong?

Caro

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Custom UI Toolbox
« Reply #6 on: October 19, 2012, 11:44:34 pm »
Yes, all of the UI stereotyped elements are being displayed with the same custom UI icon in the toolbox.  I have not played with it to try and get each one to display their original icon.