I have a UserControl
which contains a button and a textbox. User should eighter fill the textbox and click the button - so that the data is sent to the form and the usercontrol is hidden, or press Escape
on the textbox - so that the form knows user has canceled the progress.
The issue is that when the user presses tab on the textbox, the usercontrol is leaved (and hidden afterward - due to the strategy of hiding usercontrol when leaved) so neighter a data is sent to the form, nor user has canceled the progress.
All the usercontrol, the textbox and the button inside are having their TabStop
set to false but user can still come back to the form with pressing tab.
How can I prevent the tab functionality on this usercontrol? I want to make the rule: click the button or press Escape, no tab runaway, that's it.