General information
Category:
ActiveX controls in VFP
Title:
Searching for text in a RichTextControl
Environment versions
Network:
Windows 2003 Server
I use the rtf-control to show data. At this moment I want to try and locate a string inside this rtf-string. Having looked at the methods the rtf-control has I can't get it to work.
This is what I do.
- richtextcontrol that has the text I want to search
- a field in a database that contains the rtf-phrases
- for each record I copy the content to an instance of the rtf control
- then I issue the find method hoping for a result
The database contains the following rtf_phrase:
{\rtf1\ansi\ansicpg1250\deff0\deflang1029{\fonttbl{\f0\fswiss\fcharset238{\*\fname Arial;}Arial CE;}}
\viewkind4\uc1\pard\f0\fs18 Kdy\'9e produkt zne\'e8ist\'ed ve\'f8ejn\'e9 vodn\'ed zdroje, informujte p\'f8\'edslu\'9an\'e9 \'fa\'f8ady v souladu s m\'edstn\'edmi p\'f8edpisy
\par }
The phrase I want to locate contains:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset238{\*\fname Arial;}Arial CE;}{\f1\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\lang1029\f0\fs18 zne\'e8ist\'ed\lang1033\f1
\par }
In ASCII this says:
table: Když produkt zne?istí ve?ejné vodní zdroje, informujte p?íslušné ú?ady v souladu s místními p?edpisy
Locate: zne?istí
Even in ASCII I can see that it's there. However, when I ask this question to the RTF-control itself with its own find method it always returns a 'no find'.
The command I use is loRTF.olertf.Find(THISFORM.olertf.textrtf, , , 0)
Even if I ask for the loRTF.olertf.Find(THISFORM.olertf.text, , , 0) the ASCII equivalent it returns a no find.
What am I missing here?
Any help is appreciated.
Thanks,
Ron Brahma
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only