Re: Doesn't focus to Gtk::Dialog buttons



Since this widget can input text, it should have a "set_activates_default". This will tell Gtk that if the user presses enter in this widget, it will send the default response to the dialog it belongs.

yann

On 13/10/11 18:03, Glus Xof wrote:
Hi,

After a few days of my last message, I don't reach to solve it. It
shouldn't be any bug, because in other cases
Gtk::Dialog::set_response_sensitive() works perfectly... I just don't
understand what happens here...

The method first fill the three comboboxes with the suitable values
and then configures the default focus. I don't understand why the
focus is placed on the first combobox of my dialog...

I test with putting Gtk::Dialog::show_all_children() just before "gint
result = run()"... but nothing changes, or seems so...

What could I do to see what happens ???

Glus

In a method of  Gtk::Dialog derived object, I have,

// bool bt_OK, bt_APPLY....

        set_response_sensitive (Gtk::RESPONSE_OK, bt_OK);
        set_response_sensitive (Gtk::RESPONSE_APPLY, bt_APPLY);

        if (bt_APPLY)
                set_default_response (Gtk::RESPONSE_APPLY);
        else
                set_default_response (Gtk::RESPONSE_OK);

        gint result = run();

But at the run time, focus applies to an other child widget (the very
first Gtk::ComboBoxText...)

(I use the master, the very newest version of GTKmm 3.2.x...)

Is it possible to guess what's happen ?

Glus

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]