Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with Find, Replace in Editbox
Message
From
30/10/2009 13:55:23
 
 
To
30/10/2009 13:43:22
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01432365
Message ID:
01432403
Views:
51
P.S. - I tried a test without a PageFrame and added ThisForm.Refresh() to the Activate event of the form (with the Editbox on the form) and the same issue occurs. The Find/Replace from the Find Dialog doesn't seem to like a Refresh() of the Editbox control (at least in the Activate of the form). I started with a PageFrame because all of the forms having the problem were all using PageFrames. However, it looks like in my base form test with just an Editbox, the Refresh() in the Form.Activate will do it as well. Just some additional info.


>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,
>>
>>I just created a simple test form and it seems to work fine. The editbox is bound to the memo field and the table is in a database. I did a simple tableupdate to save the record. No issues.
>>
>>Hope this helps.
>>
>>Bill
>>
>>>Hello all,
>>>
>>>I am having an issue with using the Find Dialog from an Editbox. Once the Find Dialog is displayed and I Find text in the Editbox, I click the Replace button to replace the contents. Once the Replace has succeeded, I close the Find Dialog and the text has reverted back to the original value.
>>>
>>>Here is something interesting, I tried this with a base VFP Editbox class on a form. If I set the ControlSource property with the memo field, then the above problem occurs. However, if I remove the ControlSource property value, it works.
>>>
>>>Is this a known issue in VFP9, SP2 or am I missing something. How can I save the Find/Replace results once I close the Find Dialog? This is the first time I've worked with the Find (Ctrl-F) feature so I'm not sure if this has always been an issue or not. I was hoping someone with VFP9, SP2 could confirm this behavior for me. An Editbox with and without a ControlSource, with it appears the replace text is not saved and without it is saved.
>>>
>>>Thanks so much for any help you can provide.
Previous
Reply
Map
View

Click here to load this message in the networking platform