Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locating text with the RTF control
Message
From
28/04/2006 09:13:24
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01117423
Message ID:
01117470
Views:
18
>I have a table table that contains RTF phrases and I want to locate a RTF-string in there.
This means that table may contain a phrase like (in RTF):
Productos petrol¡feros n.o.s.
>
>And I need to find the ¡ character (in RTF as well)
>
>For that I do the following:
>1) I copy the data from the field in an instance of the rtf-control (lortf1)
>2) I copy the data from the locatestring in an other instance of the rtf-control (lortf2)
>3) I ask the lortf1 if the second lortf2.textrtf is present.
>
>For this I use the lortf1.find(lortf2.textrtf,,,0) method.
>I guess I must be doing things wrong because the find method never returns a hit.


The property loRTF2.TextRTF returns/sets the contents of the RTF control -- you should set here the text you want to search for; i.e., loRTF2.Find("¡",,,0). Also, I believe this method will not find RTF formatting codes if you embed it into the text to find.
Previous
Reply
Map
View

Click here to load this message in the networking platform