Hi, I've got a problem to solve that I think it might be solvable by creating a table to display data. I have created a layout DXL that reads data and then needs to display many items which naturally forms into a table. The users would like the data items to align in a table and I have tried using tabs, but as the data items are of different lengths it seems very complicated to work out how many times you tab between each of the data items etc. I thought I could use Rich Text format to create a table to put the information into. I am struggling to make this work and also how I can place variables into a Rich Text format. Any help would be much appreciated. Pippa
Pippa1 - Wed Nov 25 07:06:34 EST 2015 |
Re: Rich Text Table You can use a fixed size font in your layout DXL, then aligning the data is easy. The other option would be the rtf table. You need to build it inside a buffer. Consider however that RTF tables break lines in DOORS, when the column is too small. A last option might be a canvas, but I guess you do not want to go there ;-) Regards, Mathias |
Re: Rich Text Table Mathias Mamsch - Wed Nov 25 08:52:14 EST 2015 You can use a fixed size font in your layout DXL, then aligning the data is easy. The other option would be the rtf table. You need to build it inside a buffer. Consider however that RTF tables break lines in DOORS, when the column is too small. A last option might be a canvas, but I guess you do not want to go there ;-) Regards, Mathias For the probably easiest way (fixed width font), see this post: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014554940&ps=25 |
Re: Rich Text Table Mathias Mamsch - Wed Nov 25 08:53:53 EST 2015 For the probably easiest way (fixed width font), see this post: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014554940&ps=25 Thanks Mathias. I have tried to implement the fixed width but seem to get the same issue as the original poster did, with the fixedwidthRftPrefix being displayed in the attribute as text. I have had to tweak your code a little as I am running this as a layout DXL and so need to just display the result rather than assigning it to an attribute.
My result is: {\rtf1\ansi\deff0\deflang1033 {\fonttbl{\f555\fmodern\fprq1 Courier New;}} {\viewkind4\pard\f555 \par | Text | Text | Text
|
Re: Rich Text Table Pippa1 - Thu Nov 26 03:09:07 EST 2015 Thanks Mathias. I have tried to implement the fixed width but seem to get the same issue as the original poster did, with the fixedwidthRftPrefix being displayed in the attribute as text. I have had to tweak your code a little as I am running this as a layout DXL and so need to just display the result rather than assigning it to an attribute.
My result is: {\rtf1\ansi\deff0\deflang1033 {\fonttbl{\f555\fmodern\fprq1 Courier New;}} {\viewkind4\pard\f555 \par | Text | Text | Text
I have now got this working by writing to an object attribute and running the script to create the attribute text. I would really like to be able to do this in a layout DXL. Is this possible ? |
Re: Rich Text Table Pippa1 - Thu Nov 26 06:21:27 EST 2015 I have now got this working by writing to an object attribute and running the script to create the attribute text. I would really like to be able to do this in a layout DXL. Is this possible ? You must not use "richText" ... That works for me: displayRich "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\ftech Courier New;}} +-----+--------------------------+\\line | I | want to |\\line +-----+--------------------------+\\line | be | rendered as fixed-width |\\line +-----+--------------------------+\\line } " Regards, Mathias |