By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,926 Members | 1,820 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,926 IT Pros & Developers. It's quick & easy.

Setting focus to multi-line textbox?

P: n/a
VMI
In my Windows app, if I'm in a multi-line textbox and I'm writing a postal
address (ie. write ist line and press <Enter>, write 2nd line and press
<Enter>, etc...) how can I make sure that the Enter key will ALWAYS make the
cursor jump to the following line in the textbox? For some reason, and this
happens everywhere
except on my development PC, if a user's writing a line and presses the
<Enter> key, the program interprets that as the user pressing another button
in the Form (instead of jumping to the next line of the multi-line textbox).
I think it has something to do with where the focus is on the Form, but as
long as the cursor's on the multi-line, an <Enter> press always has to jump
to the next line. How can i make sure that it always happens?

The worst part is that I can't debug it in my dev PC because it never
happens there.

Thanks.


Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If the form has got an AcceptButton linked to a button, then enter on the
form will cause a button clicked event to be fired on this button, UNLESS
the current focus is sitting in a control which has the "AcceptReturn"
property set to true.

Does your text box have this property set to true?
"VMI" <vo******@yahoo.com> wrote in message
news:Ot**************@TK2MSFTNGP12.phx.gbl...
In my Windows app, if I'm in a multi-line textbox and I'm writing a postal
address (ie. write ist line and press <Enter>, write 2nd line and press
<Enter>, etc...) how can I make sure that the Enter key will ALWAYS make
the
cursor jump to the following line in the textbox? For some reason, and
this
happens everywhere
except on my development PC, if a user's writing a line and presses the
<Enter> key, the program interprets that as the user pressing another
button
in the Form (instead of jumping to the next line of the multi-line
textbox).
I think it has something to do with where the focus is on the Form, but as
long as the cursor's on the multi-line, an <Enter> press always has to
jump
to the next line. How can i make sure that it always happens?

The worst part is that I can't debug it in my dev PC because it never
happens there.

Thanks.

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.