Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memo Search
Message
De
26/07/2000 11:17:48
 
 
À
26/07/2000 10:56:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00397069
Message ID:
00397076
Vues:
10
This message has been marked as the solution to the initial question of the thread.
>I have created a search for a word on a memo fields using list
>here is the syntax:
>
>cVar = "Sample"
>List fields Memo for cVar $ upper(memo) to search.txt nocon
>modi comm search.txt
>
>my problem is I need to highlight all the search word(s) or make
>that word(s) on bold font. Is there any other way to do this?

In an EditBox or TextBox, you can select the first occurrence of the search word in the string by positioning Control.SelStart = ATC(cVar,memo) and Control.SelLength = LEN(cVar). If you need to highlight each occurrence in a single EditBox, you'll need to use a RichTextBox to display it, and then insert formatting codes in the string to boldface or underline or italicize each occurrence by searching the string and using STUFF() or the equivalent to add control sequences as needed. See the MSDN Library documentation on the RichTextBox control; there are classes in the VFP6 FFC which might be useful for inserting the control codes.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform