Rich Text Control and searching for bolded text 
Author Message
 Rich Text Control and searching for bolded text

Is there a way that I can look through a rich text controls data
and find every string that is bold?

                                                    Thanks......Ed Band



Mon, 14 Aug 2000 03:00:00 GMT  
 Rich Text Control and searching for bolded text

Quote:

> Is there a way that I can look through a rich text controls data
> and find every string that is bold?

Hi,

There might ...

As I read your message my RTF-control returns the following text
for 'debug.print TextBox.textRTF'

\par \plain\f2\fs23\b Author : \plain\f2\fs23 Edward A. Band

where '\b' means BOLD

You then only have to search for '\b'=Start and '\plain'=End

For example:
  s=1
  do while instr(s,.textRTF,"\b")>0
   i=instr(s,.textRTF,"\b")
   j=instr(i,.textRTF,"\plain")
   boldText=mid(.textRTF,i+2,j-i-2)
   s=j
  loop

Hope this helps

Michaela



Mon, 14 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Rich Text Box: Can I remove text and keep multicolored text

2. Justify Text in a Rich Text Control

3. Print text in rich text control without showing dialog

4. Rich text control displays text vertically!

5. Saving Rich Text Box Control as PLAIN TEXT!!!!

6. Help: Loading text into Rich Text control retains previous rtf attributes

7. Rich Text Box or text box control

8. inserting text into rich text control

9. Formatting Lines of Text in a Rich Text Box Control

10. Bold and non-bold text in a label?

11. Bold Text is larger than normal text!

12. Search and replace in a rich text box

 

 
Powered by phpBB® Forum Software