Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: displayRichWithColor
Topic Summary:
Created On: 25-May-2006 16:30
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 25-May-2006 16:30
User is offline View Users Profile Print this message


Neal Middlemore

Posts: 35
Joined: 24-Mar-2005

Hi all,

I am using the displayRichWithColor function in a DXL layout column to provide me with redlined text in glorious colour, it works great in the layout column. I used the tool to convert layout DXL to attribute DXL and displayRichWithColor does not get added as a function, does anyone have any idea as to how I can use this function in a DXL attribute?

My DXL layout code is attached...

regards

Neal
Report this to a Moderator Report this to a Moderator
 25-May-2006 22:21
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

'displayRich' is a layout only thing. Results in AttrDXL look like this: obj.attrDXLName = .... You'll probably want this: obj.attrDXLName = richText("{\\i .....}"

'attrDXLName' is like a code that means "Name of the current attribute being calculated". You can just do this: obj."MyAttr" but then the DXL needs to know into which attribute you intend to deploy it.

Not sure you can do that and preserve color, however.

- Louie
Report this to a Moderator Report this to a Moderator
 25-May-2006 23:44
User is offline View Users Profile Print this message


Kevin James

Posts: 32
Joined: 12-Dec-2005

Neal,

I think Louie is right that you can't display color through Attribute DXL.  One thing I did figure out is that you can overlay a very simple layout DXL column on top of an attribute DXL to display it in color.

i.e.,

// layout DXL is only a single line
displayRichWithColor(obj."My DXL Attribute Name");

I haven't played with this a lot, but it seemed to work ok for a script I wrote a little while ago.  I don't think using the Layout DXL undoes the performance benefits of switching to Attribute DXL.  Running the above line wouldn't be as slow as putting the whole script in layout dxl (I haven't tested this extensively though).

If you do this, I think you have to set the DXL attribute as richText(), including all the color encoding information.

Use the line Louie mentioned:

obj.attrDXLName = richText("<rtf string, with color>");

The DXL attribute will not display the color, but it will preserve the color encodings, which will display in the layout DXL.

Anyway, that's a roundabout way to get what you want, but maybe not the best way.

Kevin
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.