Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text pasted into an EditBox disappears
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00183046
Message ID:
00183096
Views:
16
>>Here's a weird one. I have several edit boxes where this happens. I click in the box, press Ctrl-V to paste some text. The text appears in the box just fine. Then I leave the Edit box with the tab key or the mouse and the pasted text disappears. It doesn't happen when I enter the text with the keyboard or if there's already text in the field.
>>
>>The control is bound to a memo field in a view. There's no code in any of the edit box methods. Any ideas?
>
>I've had some troubles like this. Are the Valid & Lostfocus firing, but text just isn't getting buffered? You can try This.value = This.value in the Lostfocus, see if that helps...

Bruce,

Thanks for the suggestion. It didn't fix the problem, but it lead me to the solution. THIS.Value=THIS.Value made the background of the edit box turn grey, but the text still disappeared. I then put a WAIT WINDOW THIS.Value in the LostFocus. That caused a syntax error. That's when I realized that THIS.Value was NULL. Sure enough, this problem only happens if the edit box's value is null.

When I put this in the GotFocus() it fixed the problem:
IF ISNULL(THIS.Value)
   THIS.Value=''
ENDIF
It seems like a bug to me. Especially since I can type into the field and its value changes but pasting doesn't work.

Thanks again for your help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform