Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MultiLine textbox AcceptsReturn problem

Status
Not open for further replies.

Kliot

Programmer
Jan 10, 2003
622
US
I have a windows form with a multiline textbox on it, when the user hits the enter key the focus moves to the next textbox instead of entering a new line. I have set the AcceptsReturn property to True and it doesn't make a difference.

How can I get the enter key to insert a new line?

I'm puzzled because on some forms it works correctly and on others it doesn't and I can't figure out why.

Thanks
Perrin
 
Check the textbox's event handler, i.e. KeyPress, KeyDown, and so on.
 
Mansii,

I have and there are no events associated with the textbox.
 
First, I have to ask because you didn't say, but Multiline is set to true right?. Next I would suggest searching your whole program and make sure something isn't resetting either of those properties to false. If you are still having problems remove it and add it back making sure it has at least a slightly different name from before. That should cover property, code, or some IDE problems.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top