Book a Demo

Author Topic: Setting the backgrouind colour selectively  (Read 3817 times)

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Setting the backgrouind colour selectively
« on: June 11, 2010, 12:49:40 am »
Hi
Is there a way to set the backgound colour of an element depending upon a given criteria?
What I would like to do is set the background colour depending upon the Phase of an element.
Is this possible?

Graham
Using V12

beginner

  • Guest
Re: Setting the backgrouind colour selectively
« Reply #1 on: June 11, 2010, 01:01:10 am »
You can check the phase with shape script and produce according output.

b.

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Setting the backgrouind colour selectively
« Reply #2 on: June 11, 2010, 01:08:22 am »
Thanks
Does that mean I have to draw the whole element in the shapescript?
I want to mainain the rest of the appearance - I am thinking of the requirement element where the status is indicated by a coloured sidebar

Graham
Using V12

beginner

  • Guest
Re: Setting the backgrouind colour selectively
« Reply #3 on: June 11, 2010, 01:20:59 am »
For the status color: Options/Objects/Show Status... (left row, 4th from bottom)
Settings/General Types.../Status   and don't forget the Applies to...

b.

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Setting the backgrouind colour selectively
« Reply #4 on: June 11, 2010, 01:29:53 am »
Ok
I am wanting this for the requirement element at the moment.
I kind of have something working
I created a new stereotype based on requirement
I added a shape script -
Code: [Select]
shape main
{
      if (HasProperty("Phase","1.0"))
      {
            setfillcolor(255,0,0);
      }
      drawnativeshape();
}
Now I have to add the created sterotype as a requirement type
This is OK but it means I lose the fact that the requirement was Functional/Non functional etc.
To get it to work properly I think I may need a profile
Graham
Using V12

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Setting the backgrouind colour selectively
« Reply #5 on: June 11, 2010, 01:34:30 am »
Yep,
Profiles did the trick
Using V12