Book a Demo

Author Topic: Shape script: text position in decoration  (Read 3532 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Shape script: text position in decoration
« on: February 13, 2020, 11:24:08 pm »
Hi all,


I've got a shape script for a CallBehaviorAction, which looks similar to an EA "extended" process, which I want to decorate with the alias ("partition") in the NW or SW corner. But since the shape is a process, putting text there means one of the contour lines will run through it.

So I decided to add a couple of blank spaces before the text: Print("  #Alias#");. This doesn't work.

With one or two blank spaces, EA ignores them.

With three or more, EA moves the text down one line (and otherwise ignores the number of blanks).

It's not a wrapping thing. If instead of the blank spaces I use full stops, I can put in dozens of them and EA prints the whole thing happily without any line feeds.

I tried it with a '\t' instead of the blanks. EA interprets this as a tab... but then does the same thing: moves the text to the beginning of the next line.

How can I move the text slightly to the right?


/Uffe
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Shape script: text position in decoration
« Reply #1 on: February 13, 2020, 11:42:12 pm »
If you put it into a subshape you should be able to place that subshape somewhat more to the right.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Shape script: text position in decoration
« Reply #2 on: February 14, 2020, 12:50:17 am »
If you put it into a subshape you should be able to place that subshape somewhat more to the right.
Hot damn!

I didn't even know you could put subshapes in decorations.

AND it accepts editableField too. :)

Thanks, G.


/Uffe
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Shape script: text position in decoration
« Reply #3 on: February 14, 2020, 12:58:54 am »
Yes, you can. A decoration is a shapescript like any other (except maybe for the size)

Geert