Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find and replace in a RichEdit field
#1
   
Is there a way to find the just the “red text” in the (3 RichEdit20A 0x54233044 0x200 4 4 216 104 "") field and replace it with a string? In your example “dlg_rich_text” this leaves the new text red.

OR

Would it be possible to replace
(rea3="simple text red text link[]")
with a string like
rea3=("simple text %s link[]" string)

I am working with a multipage dialog so the string would be formed on the 0 page and I would show it on the 2 page. I know that strings can be made on the 0 page and shown on the 2 page but I can not seem to get part of the color to come out red and the rest to come out black.
#2
In my example, this code sets red text:

Function dlg_rich_text
Code:
Copy      Help
,;red text
,cr.cpMin=12
,cr.cpMax=20
,SendMessage(re EM_EXSETSEL 0 &cr)
,cf.dwMask=CFM_COLOR
,cf.crTextColor=0xff
,SendMessage(re EM_SETCHARFORMAT SCF_SELECTION &cf)

12 and 20 are red text start and end character indexes. Instead use indexes that you need.


Forum Jump:


Users browsing this thread: 1 Guest(s)