Button Focus Ring -- how to move it to another button?

Hi.
I have an app with two buttons. The second button is disabled to start, and a user sees a focus ring around the button they have to use to enter their data.They can just hit Enter/Return and it works.

The last line of my code under that button is Button_Print.enabled = True which then makes my second button, for printing, active.

I want the focus ring to move to this button so the user can swiftly just hit enter again to print instead of having to physically click the button. Can’t figure out how to move the focus ring from the first button to my new button.

Thanks!

Use Button_Print.SetFocus()

2 Likes

In the IDE, you need to bring up the focus control thingy by clicking the gearwheel at the top of the Inspector. Then you want to Allow Tab Stop for those two buttons and set the tab index. Also set Allow Focus Ring in the Inspector if that is showing.

That’s roughly it, I generally turn all that off.

1 Like

Thanks! The gearwheel was it! Glad to see there was built-in capabilities to set tab order, etc. Just what I needed!