Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search and replace in an Editbox
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00458326
Message ID:
00458417
Views:
14
Hello, Rasheed.

If what you need is to higlight the replaced phrase, you can take a look to the SelStart, SelLength and SelText properties. These allow you to control teh selected text inside the editbox (or a textbox). I think you already had the position of the string with AT or RAT.

Hope this helps.


>> Only recently have I found out about this group of Visual Foxpro users and it is alrady proving very productive. Although I don't worship foxpro but Do I dream about? you bet I do.
>>I've developed a Laboratory Information System and part of this system is to type medical reports into an editbox. To make it easier and more accurate a table is created with medical phrases and a 5 character unique code for every phrase. When the user types the code followed by ? and F11 the keypress method will fire and extract the code by the use of Mline, RAT and search the table for the phrase. if the code is found, then
>> lcMn_Descrp = Alltrim(MN.Mn_Descrp) + " "
>> lcCd_rep = Alltrim(lcSrch_cd) + "?"
>> lcNewString =STRTRAN(THIS.VALUE,lcCd_rep ,
>> lcMn_Descrp+"XXXX")
>> this.VALUE = lcNewString
>> this.REFRESH
>> KEYBOARD '{CTRL+F}' + 'XXXX' + '{ESC}' + '{CTRL+G}'
>> + '{DEL}' PLAIN
>>This method is working, but I have a feeling that it is not the best way of doing it and I don't like the use of CTRL+F because it flashes the find window.
Previous
Reply
Map
View

Click here to load this message in the networking platform