![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: displayRichWithColor Topic Summary: Created On: 25-May-2006 16:30 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
'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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
displayRichWithColor
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.