Hey I want to change the background colour of the objects based on the attribute values. What are the ways to do it ? (directly or maybe by DXL). Also what are the ways to convert tne object text to italic or bold or underlined based on the attribute value?
|
Re: Coloring selected objects based on the attribute values So if Criticality attr is defined as High, Moderate, Low with colors Red, Yellow, Green you can force any column even the Main to be based on that attribute. -Louie In one project I give all the modules a "z_Grey" enumerated attr default value "Grey" which has color "Grey" (I think Grey333). Users do not edit that attribute. I then try to define all my Attr-DXL and Layout columns to have color based on that attribute. Since the value of all objects is (default) Grey, those columns come out grey which gives visual indication that it is read-only. Since I've got lots of "summary" attr-DXL for these huge spread-sheet modules, I find that is a lot less time then fielding questions as to why their changes (to these attr-DXL columns) doesn't work. |
Re: Coloring selected objects based on the attribute values llandale - Tue Jul 10 09:41:43 EDT 2012 I want to change the background color, not the text color also for the whole object. I am new to the Doors. So I am not sure if we can change background color based on enumerated attribute. Also I want to do it for the whole object. What I want is if an object has certain combination of attribute values (not just a single attribute), then it should be of a particular background color. |
Re: Coloring selected objects based on the attribute values archit12 - Tue Jul 10 11:21:33 EDT 2012 I've had a little luck with a Layout column with a colored Canvas so you could get one column with background color, but someone else will need to help there. -Louie |
Re: Coloring selected objects based on the attribute values archit12 - Tue Jul 10 11:21:33 EDT 2012
You can do this in a dxl layout column, but not in a normal/dxl attribute column.
{
DBE canv = getCanvas()
if (!null canv) {
background(getCanvas(), logicalReadOnlyTextBackgroundColor )
color(getCanvas(), logicalInPlaceTextColor)
}
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|