Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
4 replies Latest Post - ‏2013-05-16T17:01:25Z by Dragos.Cojocari
CJane
CJane
41 Posts
ACCEPTED ANSWER

Pinned topic Use attribute to control color of selected RPE text output

‏2013-05-13T18:06:06Z |

I am trying to control the text color in an RPE output. This is my scenario . . .

I have established an attribute in DOORS called RPE Styles. This attribute contains type enumerations that align with 20+ styles in the RPE stylesheet (Word template). These styles include BodyText, Caption, ListNum1, ListNum2, Bullet1, Bullet2, etc. 

I add the column RPE Styles to my DOORS module, the style enumerations appear next to each object in a dropdown menu, and I'm able to tag each object with the correct style. This works beautifully.

There are instances where I would like a number of the existing styles to print in a different color, e.g., blue or red. I could do this by creating additional styles, e.g., BodyTextBlue, CaptionBlue, but I would prefer to do it with Text Color attribute so I don't have to add the additional styles.

The Text Color attribute would appear as an additional column in the DOORS module. If I want an object to be output as BodyText and printed in blue, I would select BodyText in the RPE Styles column and Blue in the Text Color column.

The default font color in BodyText is black . . . Is there a way that the Text Color type enumeration could override that default color?

  • Dragos.Cojocari
    Dragos.Cojocari
    1608 Posts
    ACCEPTED ANSWER

    Re: Use attribute to control color of selected RPE text output

    ‏2013-05-15T10:22:07Z  in response to CJane

    Hey Roberta,

     

    with RPE you can apply both a a style  and individual formatting properties to any element in the template. In your template I assume you already apply the style based on the "BodyText" attribute and you could/should do the same with the text color and apply it based on the TextColor attribute.

     

    Regards,

        Dragos

    • CJane
      CJane
      41 Posts
      ACCEPTED ANSWER

      Re: Use attribute to control color of selected RPE text output

      ‏2013-05-15T22:38:08Z  in response to Dragos.Cojocari

      Dragos, we're on the right path!

      I have a document that with a template (essentially another complete document) embedded in it. Both the main document and the embedded document contain the same styles, but I want the embedded document to be printed in blue.

      I'm trying to avoid having to create a separate set of the same styles for the blue text. I want to add an additional control . . . perhaps via an additional Text Color attribute in DOORS -- that I can use to tag those objects I want to be printed in blue text.

      I've attached a screenshot of a text module that contains the two attribute columns: RPE Styles and Text Color. My struggle is to set the situation up in RPE so that if RPE Styles == "Body" && Text Color == "Blue" the text will print in

  • SeanF
    SeanF
    31 Posts
    ACCEPTED ANSWER

    Re: Use attribute to control color of selected RPE text output

    ‏2013-05-16T14:53:14Z  in response to CJane

    In RPE 1.2 you can set the font from an elevated attribute and you can also set the font colour from an elevated attribute (probably the same in 1.1)

    Not sure what happens if you set both simultaneously from separate attributes but have you tried that?

    • Dragos.Cojocari
      Dragos.Cojocari
      1608 Posts
      ACCEPTED ANSWER

      Re: Use attribute to control color of selected RPE text output

      ‏2013-05-16T17:01:25Z  in response to SeanF

      >>> Not sure what happens if you set both simultaneously from separate attributes but have you tried that?

      That is what I was suggesting. I assume there is now a script that sets the "style" property of the RPE template element  based on the RPEStyles attribute. A similar script is needed for setting the font color property of the RPE template element from the "Text Color"  DOORS attribute.

       

      Regards,

         Dragos