S
Steve Sargent
Hi:
I'm trying to develop a message reply form, and I want the reply form
to automatically be set to the text, with the cursor at the end of the
current text.
I basically use the following lines to do it:
this.textBox3.Focus();
this.textBox3.SelectionStart = this.textBox3.Text.Length;
this.textBox3.SelectionLength = 0;
This code works when I test it using the button click handler. the
minute I click the button, textBox3 gets the input focus, and the
cursor is at the end of the current text.
However, when calling from the Load method, it doesn't change the
focus at all.
Where should I be adding this code so that when the form first shows
up on the screen, the input focus is at the end of textBox3's text?
Thanks for any help.
Steve
I'm trying to develop a message reply form, and I want the reply form
to automatically be set to the text, with the cursor at the end of the
current text.
I basically use the following lines to do it:
this.textBox3.Focus();
this.textBox3.SelectionStart = this.textBox3.Text.Length;
this.textBox3.SelectionLength = 0;
This code works when I test it using the button click handler. the
minute I click the button, textBox3 gets the input focus, and the
cursor is at the end of the current text.
However, when calling from the Load method, it doesn't change the
focus at all.
Where should I be adding this code so that when the form first shows
up on the screen, the input focus is at the end of textBox3's text?
Thanks for any help.
Steve