Re: Setting a default control in a windows
- From: Murray Cumming <murrayc murrayc com>
- To: Bob Caryl <bob fis-cal com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Setting a default control in a windows
- Date: Mon, 14 Mar 2005 16:04:18 +0100
On Mon, 2005-03-14 at 08:46 -0600, Bob Caryl wrote:
> Hello All,
>
> Gonna try this question again:
>
> I am trying to set a button in my window to be the "default" widget,
> i.e. this buttons "on_clicked" connected function will be executed when
> the enter key is pressed when this window has focus.
>
> The code I'm using is as follows:
>
> default_button->set_flags(Gtk::CAN_DEFAULT);
> default_button->grab_default();
> this->activate_default();
I think you want to use Gtk::Window::set_default(). Maybe you are
confusing that with activate_default().
This is easier with libglademm.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]