General information
Category:
Coding, syntax & commands
Title:
Search and replace in an Editbox
Hi All;
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.
Any suggestion for an elegant solution
Thanks
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