Hi !!! If any one can help me I'll be pleased! I have one TextBox. I entering some text in the Text Property. After that I pressing the "Enter" button and the cursor position it's going of the next line. I would like to go back the carret at the beggining of the same line where it was. Sorry if my English it's Suck.
destruct0
7
Junior Poster in Training
Recommended Answers
Jump to PostDid you try setting the Multiline property to false.
Jump to PostTo move the cursor to the beginning of the textbox you need to do the following:
textBox1.SelectionStart = 0; textBox1.SelectionLength = 0; textBox1.Select();
However, where to do this is the problem.
You can not do it in the TextChanged event as the user might still be typing …
All 6 Replies
nick.crane
342
Veteran Poster
nick.crane
342
Veteran Poster
destruct0
7
Junior Poster in Training
Momerath
1,327
Nearly a Senior Poster
Featured Poster
destruct0
7
Junior Poster in Training
Momerath
1,327
Nearly a Senior Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.