Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert a string in memo
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00903323
Message ID:
00906110
Views:
18
Hi David,

I created a new form with an edit box and a command button. Command button did:

ThisForm.Edit1.Seltext = “Whatever”

I wrote some words in the edit box. Then, I went between them and pressed enter a few times. Then, I pressed the command button. So far every thing was fine, but when I pressed enter next to the “Whatever” and then pressed the command button, “Whatever” inserted two characters after the word in the next line after it. For example, if I had “Nextline” in the line after that, it became: “NeWhateverxtline”. I did not have any code in that form.

Thanks for the time you put on this,
Ali


>Ali,
>
>>This problem disappeared when I cleared the content of ControlSource (which was a memo field).
>
>There has to be some other code somewhere that's causing the ill-behavior. I just did this from the command window
>
>create cursor x1 ( m1 m )
>append blank
>replace m1 with "this is a test of a memo content insert into an editbox"
>_screen.AddObject( "edt", "editbox" )
>_screen.edt.ControlSource = "x1.m1"
>_screen.edt.Height = 200
>_screen.edt.Width = 200
>_screen.edt.Visible = .t.
>
>I clicked into the edt right in front of the word "of" and clicked back to the command window
>
>_screen.edt.SelText = " insert this text right here "
>_screen.edt.SetFocus()
>
>This is the current content of the control:
>
>this is a test insert this text right here of a memo content insert into an editbox
>
>with the insertion point right at the end of the inserted text. So are you sure you don't have any code in in the editbox or one of it's parent classes that is preventing you from seeing the same result?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform