lundi 1 mai 2017

Move focus to checkbox after _onleave event

I have a textbox with an _onleave event. I check the text in the textbox and generate a messagebox. In most cases focus moves, to whatever was clicked, once the messagebox clears, but not when it was a checkbox. Is there any way I can capture what was clicked that generated the _onleave event so that I can assign focus to it ( or in this case click the checkbox) once _onleave code is completed. I have tried:

Control control = (Control)sender;
control.Select();

Unfortunately, this captures the initial textbox and returns focus to it. Thanks




Aucun commentaire:

Enregistrer un commentaire