Book a Demo

Author Topic: Element text positioning  (Read 4753 times)

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Element text positioning
« on: May 14, 2009, 01:02:58 am »
Does anyone know what determines where the element name text appears in an element on a diagram ?   Mostly the text is centred,  but in the mindmapping toolbox the "subtopic"  element has its text left justified.  I'd like to use this setting on other elements if possible but can't find where to configure it.

Any ideas ?
thanks

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Element text positioning
« Reply #1 on: May 14, 2009, 09:51:23 am »
That was done with a shape script, something like this:

Code: [Select]
shape main
{
    v_align="center";
    h_align="left";
    rectangle(0,0,100,100);
    printwrapped("#name#");
}
h_align can have the value "center", "left" or "right" and v_align can have the value "center", "top" or "bottom".
« Last Edit: May 14, 2009, 09:52:30 am by KP »
The Sparx Team
[email protected]

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Element text positioning
« Reply #2 on: May 14, 2009, 06:11:07 pm »
Thanks KP - that makes sense.

One additional question though - I don't seem to be able to find the stereotypes for the mindmapping elements using Settings/UML which is where you would normally apply the shapescript isn't it ?  So if I wanted to left align the text for "Topic" - where would I create the shapescript ?

thanks