Set focus to dialog button

Set focus to dialog button

Hi,
Can someone suggest a good way to set focus to a specific dialog button, like "cancel". At the moment, the focus seems to go to the input field by default. I'd like to be able to set it to what I choose.
Thanks.