On Mon, 28 Jul 2003, Christian Reis wrote:

> On Mon, Jul 28, 2003 at 05:20:15PM +0200, Geoff Bache wrote:
> > Yes, really.
> > 
> > My app is a testing framework. It is more important that it is like
> > other testing frameworks than that it is like other GTK applications.
> > The rows represent tests that turn green when successful or red when 
> > failing. It is then somewhat confusing if they turn blue when selected by
> > the user, who then cannot see the state any more.
> 
> In your case, it would probably be best to use a thin frame around the
> selected list entry, which would identify selection clearly (without
> resorting to italicizing or other text hacks).

I agree. It would be great if I could do this.

> 
> Anyway, back to your practical problem ;)
> 
> I don't know the TreeView very well, but have you tried looking at the
> TreeSelection object's style? The TreeView itself may have styles for
> certain states, but the GTK+ code is going to be the definitive
> reference if it's not in the manuals.
> 

The TreeSelection doesn't seem to have any style, because it's not a 
Widget.

>>> dir (gtk.TreeSelection)
['__class__', '__cmp__', '__delattr__', '__dict__', '__doc__', '__gdoc__', 
'__getattribute__', '__gobject_init__', '__grefcount__', '__gtype__', 
'__hash__', '__init__', '__new__', '__reduce__', '__repr__', 
'__setattr__', '__str__', 'chain', 'connect', 'connect_after', 
'connect_object', 'connect_object_after', 'destroy', 'disconnect', 'emit', 
'emit_stop_by_name', 'flags', 'freeze_notify', 'get_data', 'get_mode', 
'get_property', 'get_selected', 'get_tree_view', 'handler_block', 
'handler_disconnect', 'handler_unblock', 'iter_is_selected', 'notify', 
'path_is_selected', 'select_all', 'select_iter', 'select_path', 
'select_range', 'selected_foreach', 'set_data', 'set_flags', 'set_mode', 
'set_property', 'set_select_function', 'stop_emission', 'thaw_notify', 
'unselect_all', 'unselect_iter', 'unselect_path', 'unset_flags']

The TreeView has a style, but changing it only seems to affect the arrows 
at the left of the display. The actual information is in the columns, 
which are displayed by the CellRenderer. But neither of these is a Widget, or 
has an associated style object, or any obvious way from the documentation 
to affect the selection display. The "background" property of CellRenderer 
is unfortunately not dependent on the state (gtk.STATE_SELECTED etc.)
 
Regards,
Geoff Bache



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to