Environment versions
Network:
Windows 2003 Server
Hey Bill,
Thanks for the info. Now I'll have to figure out what to do with all these forms that have a Refresh either in the Activate of the form or Activate of the Page of a PageFrame. Of course, it's only an issue with Forms or Pages that have an Edit box where we are using the Find/Replace feature.
Thank you for all your help/confirmation!
>>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.
Previous
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