Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with Find, Replace in Editbox
Message
 
 
À
30/10/2009 13:43:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01432365
Message ID:
01432402
Vues:
54
>Hi Bill,
>
>Thank you for taking the time to check this out for me. Here is what I found out, if I add the Editbox to a PageFrame (Page 1) and then add the following to the Activate event of the Page:
>
>This.Refresh()
>
>I then run the form with the PageFrame added (keep in mind, all of these controls are base VFP controls) and then click within the Editbox, type some text and then click Ctrl-F, the Find dialog is displayed. I do a Find/Replace and as soon as the replace is complete and I click the Close button on the Find Dialog, the text in the Editbox reverts back to the original text. I can go back into the form and remove the code from the Page Activate event and it works as expected.
>
>I was mislead into thinking it was an issue with the Editbox having a memo field from the table as the ControlSource.
>
>Anyway, the Refresh method of the Page seems to be the culprit. I went back to some other forms where I was having the same problem and removed the This.Refresh from the Activate event of the Page and now all the Editboxes retain the Replaced value from the Find Dialog.
>
>If you have some time and have a form with a pageframe that contains an editbox and want to give the above a try to see if you get same results, I would greatly appreciate it.
>
>Thanks again for your response.
>
Hi Alan,

When I read your problem the first time I had a recollection I had a similar problem before and your second message confirmed it. I think you need to do this.Refresh in your page conditionally in Activate of the page. In other words, you may want to add a flag.

Alternatively you probably can use Click event of the page instead of Activate to refresh controls. The refresh is needed if you may move to another record on the first page - then when you come to the second page you do need a refresh.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform