Setting focus to child widget on notebook switch-page

I have a notebook widget with several pages. The pages each have a few
child widgets, one of which is a Gtk::Entry. When I switch to a page I
would like focus to switch to the Gtk::Entry widget. I’ve got a handler
that is successfully executing on the switch-page signal but I’m not
sure
how to get the focus to move to my entry widget so I can start typing
without having to manually click it. Any help appreciated.

2010/2/16 Steve G. [email protected]:

I have a notebook widget with several pages. The pages each have a few
child widgets, one of which is a Gtk::Entry. When I switch to a page I
would like focus to switch to the Gtk::Entry widget. I’ve got a handler
that is successfully executing on the switch-page signal but I’m not sure
how to get the focus to move to my entry widget so I can start typing
without having to manually click it. Any help appreciated.

Did you try Gtk::Wigdet#grab_focus ?

Simon

Thanks Simon. That’s what I needed. Sorry for the silly question.

-Steve