¿Cómo usar el evento KeyPress en textBox con el carácter de tabulación?
Pregunta
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Tab)
{
keybox4.Focus();
}
}
¿No funciona pero ingresa el carácter? ¿Funciona?
Solución
Deberá tener la propiedad MultiLine
establecida en true
, y AceptsTab
también se establece en true
.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow