you can't do this until the widget has been realized, because before that time get_window() will return a null (ref) ptr. put that in the realize handler, or make sure you do it post-realize. --p