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:
00906321
Views:
28
Ali,

Ok, now I now what you are seeing. It's a bug that goes way back to at least VFP5 because that's where I first ran into it.

The editbox it has to do with the CR and LF characters are rendered into the control and interact with setting the SelText property.

Using this seems to be more reliable:
_screen.edt.Value = left( _screen.edt.Value, _screen.edt.SelStart ) + ;
   " insert this text " + ;
   substr( _screen.edt.Value, _screen.edt.SelStart + 1 )

Sorry for the bum steer.

>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.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform