Re: A signal for a ComboBoxText



All_the_Gtkmm_Forum: - Hey, Glus !!!, according the reference
Gtk::ComboBoxText::get_active() returns a Gtk::TreeModel::Iterator
value... use  Gtk::ComboBoxText::get_active_row_number() instead !!!

Glus: - Sorry, sorry... people is not perfect... sometimes falls in
wrong... thanks to all for your help. ; ))

All_the_Gtkmm_Forum_again: - BTW,  We don't know if it's a good
technique but pointers can be used to pass objects.

Glus: - Thanks, again. I'll try it ! ;))

Glus.

2009/11/17 Glus Xof <gtglus gmail com>:
> Hello everybody,
>
> I wrote a Gtk::ComboBoxText (that preferably should remain inside a
> class method scope) that should drive something each time when an
> active element changes. I was trying this doing,
>
> Gtk::ComboBoxText m_comboboxtext;
>
> m_comboboxtext.signal_changed().connect(sigc::bind<Glib::ustring>(sigc::mem_fun(some_object,
> &some_class::method1),
>            m_comboboxtext.get_active_text()));
>
> But Gtk::ComboBoxText::get_active_text() doesn't throw the current
> active element...
>
> What should I change ?
>
> Glus.
>


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