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: How can I convert strings to RichText?
Topic Summary:
Created On: 2-Oct-2002 07:29
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.
Answer This question was answered by r g, on Thursday, October 3, 2002 8:09 AM

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.
 2-Oct-2002 07:29
User is offline View Users Profile Print this message


Paul Miller

Posts: 376
Joined: 2-Oct-2002

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
Report this to a Moderator Report this to a Moderator
 2-Oct-2002 16:42
User is offline View Users Profile Print this message


r g

Posts: 24
Joined: 20-May-2002

Answer 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.

-------------------------
rg.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.