![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How can I convert strings to RichText? Topic Summary: Created On: 2-Oct-2002 07:29 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Paul, Your question has two possible answers to it. One of which is easy. The other requires more extensive programming and search/replace based upon the words you wish to be bolded. There is a function in DOORS called: richClip() This copies whatever is on the system clipboard into a variable you assign. For example: object."importantBoldWords" = richClip The second answer is slightly more complicated and requires the use of your favorite text parsing function to extract the words you want, apply the RTF bold style, then insert them back into the original string and then copy that richText string to importantBoldWords. Use the functions: (From the DOORS v5.2 DXL Reference) string cutRichText(string s, int start, int end,) string replaceRichText(string s, int offset, int length, string r) to help cut and replace the string after you are done marking it up with the bold RTF styles. Good luck. | |
![]() |
|
Hi,
I have a DXL layout script that displays some key info from incoming links. I want some of that info to be displayed in Bold format. How can I convert the contents of a string variable to Bold format? From reading the DXL manual, it seems as though you can only apply RTF tags to raw text and not to the contents of a string variable. ------------------------------------------ Paul Miller Tenix Specification Practices Project, Nelson House, Williamstown, Vic, Australia. Desk Phone: +61 (0)3 9244 4078 Mobile: +61 (0)418 135 103 E-mail: paul.miller@tenix.com ------------------------------------------ ------------------------- Paul Miller Specification Practices Specialist, EuroCyber, Melbourne, Australia. Mobile: +61 (0)418 135 103 Web Site: http://www.eurocyber.biz E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz |
|
![]() |
|
![]() |
|
Paul,
Your question has two possible answers to it. One of which is easy. The other requires more extensive programming and search/replace based upon the words you wish to be bolded. There is a function in DOORS called: richClip() This copies whatever is on the system clipboard into a variable you assign. For example: object."importantBoldWords" = richClip The second answer is slightly more complicated and requires the use of your favorite text parsing function to extract the words you want, apply the RTF bold style, then insert them back into the original string and then copy that richText string to importantBoldWords. Use the functions: (From the DOORS v5.2 DXL Reference) string cutRichText(string s, int start, int end,) string replaceRichText(string s, int offset, int length, string r) to help cut and replace the string after you are done marking it up with the bold RTF styles. Good luck. ------------------------- rg. ![]() |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
How can I convert strings to RichText?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.