Avoid buttons tacking focus

Is it possible to avoid buttons to take focus.
When my applications shows very often the a button is the fisrt component in the layout an it takes focus but I want the focus setted in the first text field (or combo) in the layout.
Is it possible ? How ?

You can programmatically set the focus to a field, e.g.


I tried but it doesn’t work, I don’t understand why.
Any suggestion ?

Not without seeing some code. Try to make
as simple as possible
test case that reproduces the problem.