|
Re: Forbid focusing of TreeView columns: msg#00125gnome.gtk+.python
Franck Pommereau wrote: I believe this is impossible (or should be). Anything that can be The column header is just a button. The trick is getting a pointer to it. This can be done using this hack, where 'col' if the gtk.TreeViewColumn object: label = gtk.Label('_Foo') label.set_use_underline(True) col.set_widget(label) label.show() w = label while not isinstance(w, gtk.Button): w = w.get_parent() w.set_property("can-focus", False) Note how I also add a mnemonic to the new label widget so that the column header is still accessible from the keyboard. -- Tim Evans Applied Research Associates NZ http://www.aranz.com/ _______________________________________________ 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: | Re: Forbid focusing of TreeView columns: 00125, Franck Pommereau |
|---|---|
| Next by Date: | Re: Forbid focusing of TreeView columns: 00125, Franck Pommereau |
| Previous by Thread: | Re: Forbid focusing of TreeView columnsi: 00125, Franck Pommereau |
| Next by Thread: | Re: Forbid focusing of TreeView columns: 00125, Franck Pommereau |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |