how to make tab work

how do I code so when I hit TAB, the focus goes from button to button

You are probably working on a Mac.
It’s not a Xojo thing, it’s a Mac preference.

System Preferences --> Keyboard --> Shortcuts
At the bottom “Full Keyboard access: In windows and dialogs, press Tab to move keyboard focus between:”
Change this setting from “Text boxes and lists only” to “All controls”.

After you have changed this setting, hitting Tab should now work on the buttons too.

If you happened to have Christian’s Monkeybread Xojo Plugins, you can use the NSButtonControlMBS for that effect

Another way is to place the button over a canvas of the same size. The canvas will get the tab stop, and show the focus ring. Then just use KeyDown to push the button.