❔ Button click is advancing control focus
I am writing a program which runs a test after the user clicks a button. The test takes a couple seconds, so I am disabling the button after it is clicked to prevent the user from firing multiple events. However, after the button is pressed, focus is being passed to the TextBox above it (next in tab order), causing the text to be selected which could allow for the user to accidentally change the IP.
The desired behavior would be to have the button maintain focus the entire time, or at the very least prevent the TextBox from gaining focus while still being next in the tab order. What would be the best way to achieve this behavior?
Current code flow is:
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.