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 do I apply BOLD format to existing string
Topic Summary:
Created On: 24-Oct-2002 13:49
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.
 24-Oct-2002 13:49
User is offline View Users Profile Print this message


Richard harkness

Posts: 13
Joined: 24-Oct-2002

The code I have a present is this

s = probeRichAttr_(othero,"Object Text", false)
if (!null s){displayRich s}

This works well and does display the correct text from an outlink. What I wish to do is apply bold formatting to the string (s).

I have searched the DXL Ref Man and drawn a blank. Please Help.
Report this to a Moderator Report this to a Moderator
 25-Oct-2002 00:42
User is offline View Users Profile Print this message


Vincent Furman

Posts: 11
Joined: 22-Oct-2002

Try

{displayRich "{\\b" s "}"}
Report this to a Moderator Report this to a Moderator
 25-Oct-2002 11:45
User is offline View Users Profile Print this message


Richard harkness

Posts: 13
Joined: 24-Oct-2002

Thanks for the reply, but this just displays the string in standard text style...

...any other ideas ?
Report this to a Moderator Report this to a Moderator
 28-Oct-2002 08:41
User is offline View Users Profile Print this message


Richard harkness

Posts: 13
Joined: 24-Oct-2002

Anyone ??
Report this to a Moderator Report this to a Moderator
 28-Oct-2002 16:56
User is offline View Users Profile Print this message


Sylvia Boltic

Posts: 9
Joined: 11-Oct-2002

Assignment (rich text) in the DXL reference manual may help you.
Report this to a Moderator Report this to a Moderator
 28-Oct-2002 17:13
User is offline View Users Profile Print this message


Sylvia Boltic

Posts: 9
Joined: 11-Oct-2002

s = probeRichAttr_(othero,"Object Text", false)
if (!null s)
s = richText "{\\b "s"}"
Report this to a Moderator Report this to a Moderator
 28-Oct-2002 18:45
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Richard,

Sylvia is correct. Note the space is REQUIRED after the opening tag, hence "{\\b " instead of "{\\b". Vincent's example would have worked except for the missing space (certainly a typo).

Now that us DXL junkies are back from the recent Telelogic UGC in Vegas, questions should be answered at the usual pace.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 29-Oct-2002 08:54
User is offline View Users Profile Print this message


Richard harkness

Posts: 13
Joined: 24-Oct-2002

Sylvia,

Thanks for the reply... I tried what you suggested and made some progress. The string still does not display in BOLD but does display a lot of markup tags before and after the string itself.

Do I need to turn richtext on somehow. I am using DOORS 6.0 SR1 by the way.

Report this to a Moderator Report this to a Moderator
 29-Oct-2002 18:07
User is offline View Users Profile Print this message


Gyan Penrose-Kafka

Posts: 10
Joined: 12-Sep-2002

I am assuming that you are trying to "print" the string. The print function doesn't seem to do richtext.

doing the following correctly sets the object text to bold:

Object o = current
string s = o."Object Text"
print s "\n"
o."Object Text" = richText "{\\b "s"}"

However, adding the following doesn't print the string to the DXL window as RichText

s = o."Object Text"
print s "\n"



If you create a DXL attribute (in this case called RT), you can display the string in that attribute as bold.

Object o = current
string s = o."Object Text"
o."RT" = richText "{\\b "s"}"
s = o."RT"
displayRich s "\n"




-------------------------
Gyan Penrose-Kafka
Requirements Management Consultant
gyan@zenmonkey.net

Edited: 29-Oct-2002 at 18:25 by Gyan Penrose-Kafka
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.