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:26:16 +0100
On Mon, 2005-03-14 at 09:14 -0600, Bob Caryl wrote:
> Murray Cumming wrote:
> >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.
> >
> >
> Hey Murray,
>
> I tried activate_default to no avail.
set_default().
> The application has three
> Gtk::Entry objects. When run, the window appears with one of these
> Gtk::Entry objects having focus. Perhaps there is something I should to
> in relation with the Gtk::Entry object? Perhaps it needs to signal the
> window that the enter key has been pressed?
>
> Thanks,
>
> Bob Caryl
--
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]