Thanks, but it didn’t work. the button got the focus and it immediately went to the Listbox. I’m going to try restarting my Mac and see if that is the problem.
Tim Hare means System Preferences -> Accessibility. However, the options in there are so many that I wasn’t able to find something for buttons at first glance.
But that’s what the Inspector focus control is made for. If you switch off the Tab Stop, the listbox will not get “first responder” status anymore.
It will also not participate in TAB-switching the focus. In case that is necessary, you will have to program that functionality yourself.
I am also trying to create a project that proves something related to focus. Focus didn’t happen when I expected it to happen.
All I am asking is when the control is being created, before the open event fires, and there is nothing which would cause an event to fire (everything except for GoTFocus) does that still mean GotFocus will fire during the creation?
Depending on tab stop settings, yes. While you don’t like the idea of a default focus control, the OS engineers decided so. An opening window will always try to set focus to what Apple calls “first responder” – the first control in tab order line.
You can influence this more deeply when you declare into the controls – Apple’s NSResponder class has some methods that theoretically could be overridden as events to give the controls full control over their focus. As far as Xojo is meant, tab stop and/or focus handling by code are the only means.