|
Forbid focusing of TreeView columns: msg#00117gnome.gtk+.python
Hi all, I'm building a PyGTK interface in which I would like that no widget would be able to get the focus (and so to be activated by pressing the Return key). For this purpose, for each widget, I do: widget.set_property("can-focus", gtk.FALSE) My problem is a TreeView which has a clickable column, it get the default focus and I did not find how to forbid that. I tried: def focus (widget, *args) : try : widget.set_property("can-focus", gtk.FALSE) except : pass try : widget.set_property("can-default", gtk.FALSE) except : pass win.forall(focus) where win is my application window (I also tried on the TreeView) but it doesn't work. :-( I also tried with widget.unset_flags, same result. :-(( If I choose another widget and give it the default focus (widget.grab_default and widget.grab_focus) it's OK until I click on the column which then keeps the focus. :-((( I'm sure I could capture the Return key but I don't want to have this dashed line around the focused widget... I think that this column has somewhere an associated widget but I could not find it anywhere (and neither could win.forall). I'm using PyGTK-2.0.0 and cannot use another version. Thanks in advance for any idea! Franck _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Resizing a HandleBox: 00117, Franck Pommereau |
|---|---|
| Next by Date: | Re: Threads and applets (gnome.applet): 00117, Gustavo J. A. M. Carneiro |
| Previous by Thread: | Resizing a HandleBoxi: 00117, Franck Pommereau |
| Next by Thread: | Re: Forbid focusing of TreeView columns: 00117, george young |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |