Magnus Therning wrote:

On Sun, May 15, 2005 at 06:58:46PM -0300, Christian Robottom Reis wrote:


On Sun, May 15, 2005 at 12:01:39PM -0700, David M. Cook wrote:


On Sun, May 15, 2005 at 04:23:37PM +0100, Magnus Therning wrote:


I can't seem to find what signal will be emitted when a row in a
TreeView (with ListStore) is selected. I've tried the following signals:


You connect to the TreeView's selected object's "changed" signal, then in
your call back you check for what actually is selected.  Assuming multiple
selection mode:

treeview.get_selection().connect("changed", self.on_selection_changed, ...)
...
def on_selection_changed(selection, ...):
model, paths = selection.get_selected_rows()
if paths:
...
I'm sure this is in the FAQ somewhere.


Yeah, at

  http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.011.htp

I've improved the stub example there.



I would have expected to find it in the tutorial as well though. Section 14.8 on TreeSelections.

Oh, BTW I've added the FAQ to my bookmarks now :)



Perhaps the Reference Manual would also be of use to you for these questions:

http://www.pygtk.org/pygtk2reference/index.html

John
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to