Thank you for your help Russ. I tried it. My only concern is that
styleRun only works for a string of text that requires the same style.
My problem is that I have sets of text each with words that need to
be style on different positions. I would like to get set by set and
style the words in each set that need to be style and then store
them in a variable . Finally display them in a editfield. Each set
of text can contain from 3 to 6 paragraphs.
For example this is my pseudo code:
DECLARE VAR1
WHILE NOT DB EORS
SELECT a set of text
FIND the word "Computer" in the set
STYLE the word computer in the set to BOLD and RED
STORE VAR1 = VAR1 + set
WEND
DISPLAY VAR1 in EditField
Hope this is a better picture of my task.
BT
On Dec 09, 2006, at 7:20 PM, Russ Jones wrote:
Hi BT
In case you haven't solved it yet, here is a modification of your
request, that works.
Russ
=================================
Dim s, s2 as StyleRun
s = new StyleRun
s2 = new StyleRun
s.text = "REAL"
s.bold = true
s2.text = "basic"
s2.textColor = rgb(255,0,0)
Editfield1.StyledText.AppendStyleRun s
Editfield1.StyledText.AppendStyleRun s2
============================================
On Dec 9, 2006, at 1:19 AM, cipher.one wrote:
Dim s,s2 as string
s = "REAL"
s2 = "basic"
Editfield1.text = s + s2
The code above works but not the code below...
Dim s, s2 as styledText
s = new styledText
s2 = new styledText
s.text = "REAL"
s.bold(0,3) = true
s2.text = "basic"
s2.textColor(0,4) = rgb(255,0,0)
Editfield1.StyledText = s + s2
Has anyone tried to concatenate styledText before, if so how can I
do it? Thanks
BT
Russ Jones
[EMAIL PROTECTED]
RB 2006r4 MacOS 10.4.8
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>