Re: [gtkmm] Signals
- From: Matthew Walton <matthew alledora co uk>
- To: xigorj sezam net
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Signals
- Date: Fri, 16 Apr 2004 10:21:19 +0100
Igor Jovanovic wrote:
Hi,
I have a little problem with ListStore.
Im using glade 2.0.0 and glademm 2.0.0.1
This works:
listFiles->signal_cursor_changed().connect(SigC::slot(*this,
&window1_glade::on_listFiles_cursor_changed));
When I select a row, function "on_listFiles_cursor_changed" is called
and that is OK.
This works too, but function "on_listFiles_cursor_changed" is NOT
callded. Why ?
And I did not disconected the signal above.
Glib::RefPtr<Gtk::TreeSelection> refTreeSelection;
refTreeSelection = listFiles->get_selection();
rowIter = listFiles->get_model()->children()[RowNum];
if (rowIter)
refTreeSelection->select(rowIter);
Any ideas ???
Thanks in advance.
This is a guess, but I would suggest that the selection and the cursor
are not the same thing, and thus changing the selection does not
necessarily change the cursor. If you want to catch selection changes,
use Gtk::TreeSelection::signal_changed() which works if you set the
selection via code, or via clicking on the TreeView, using the keyboard
or whatever.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]