>Is there a single property setting for Textbox that controls whether Enter (CR) moves to the next control (loses focus)? Right now only Tab moves you to the next control.
>
>Or do I have to code it in the KeyPress event checking for 13?
>
>If I need to code it in Keypress, what command/method do I use to advance it to the next control?
>
>Thank you in advance.
Something like this should work:
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Enter)
{
this.SelectNextControl((TextBox)sender, true, true, true, true);
}
}
Semper ubi sub ubi.