Callback function refactored

- using a generic function
- title change: 'Tab Widget' -> 'Tabbed Widget'