[pygtk] Multiple selection in treeview, was: Re: CellRendererText doesn't have clicked signal now what?

2005-02-19 Thread Abel Daniel
Thomas Mills Hinkle writes:

 An additional query -- does anyone know if it's possible to select and
 arbitrary range of a treeview, a la spreadsheets? I'd like to let the
 user, for example, select four rows of one column so that I could
 offer e.g. a fill down action.
Sure. You have to enable multiple selection mode by calling

treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)

After that, the user can use the usual Shift + click and Ctrl + click
to select multiple rows.
___
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/


Re: [pygtk] multiple selection in treeview

2002-11-01 Thread george young
On 18 Oct 2002 15:57:38 +1300
Rob Brown-Bayliss [EMAIL PROTECTED] wrote:
 Hi.  How do you do multiple selection in treeview widgets?
 
 I have been going over and over the docs looking for something like
 set_multi_select or what ever and it's either missing for the docs or
 their is some other way to handle selecting multiple rows in a tree.

tree_sel = my_treeview.get_selection()
tree_sel.set_mode(gtk.SELECTION_MULTIPLE)

See the docs:
http://www.gnome.org/~james/pygtk-docs/class-gtktreeview.html#method-gtktreeview--get-selection
http://www.gnome.org/~james/pygtk-docs/class-gtktreeselection.html#method-gtktreeselection--set-mode
-- 
 I cannot think why the whole bed of the ocean is
 not one solid mass of oysters, so prolific they seem. Ah,
 I am wandering! Strange how the brain controls the brain!
-- Sherlock Holmes in The Dying Detective
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/