Activate a widget then set the focus on it

Adding a function activate_focus()