Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search and replace in an Editbox
Message
 
To
01/01/2001 16:58:13
Rasheed Al Rasheed
Riyadh Armed Forces Hospital
Riyadh, Saudi Arabia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00458326
Message ID:
00458329
Views:
13
This is a pretty good method. An alternative might be:
The user is typing along in the edit box and gets to a point where a code/description should be. The editbox could have a 'right click' event that would pop up a list box with the codes/description in it. The user could then select the code/description from the listbox. The selection would close the listbox (it would need to be in a form or - you could create a popup menu with all the codes, and select from that), then add the code/description to the end of the EditBox value and re-setfocus back to the 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
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform