I wizard that contains two panels. One panel contains a form, and that form contains a textbox. The other panel contains a button. I want to press tab from the textbox, and want to see the button highlighted (or selected) afterward. This is intended to allow the user to press enter to press the button, instead of manually clicking it.
My current process does not allow the button to be selected after pressing tab from the textbox. I have also included a picture.
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Tab)
{
if (FORM3.textbox().Focused)
{
//activate parent form
this.Activate();
WizardButton.Focus();
WizardButton.Select();
}
}
return base.ProcessCmdKey(ref msg, keyData);
}
