Re: Different Background-Color for even/odd Rows in TreeView



thomschu wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi ,
how can I change the background-color for a TreeView, so that even and
odd Rows
have a different color.
I have a TreeView with Entries which have child, so you can expand and
collaps the View ....
I tried already to change the background-color with
CellRendererText->property_background_gdk(),
but so I can only access the background of my cells, but not the area
with the arrows to expand and
collapse the entries .......

Actually what I want is just like the standard-behaviour of the
TreeView - white/light-blue background
for even/odd rows. The problem is, that the TreeView behaves only
under Linux/Unix like this, under
Windows the background is only white.

thanks

gizmo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEDs9JWtOLqJ6H0JYRAvL7AKCWSfQwfmTlh24W0xu9UzJXLm+6CACgu2+X
hFFlnYFNzjjqb3EkBRdaJQs=
=DGu4
-----END PGP SIGNATURE-----

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

The colors that Gtk::TreeRows are colored depends on the theme you are using.
Create a gtkrc file for your project.  There are some examples online.
Add it to your project...

gtk_rc_parse( FILENAME );

You can add something like :


style "treeview"{


  GtkTreeView::even-row-color = "white"
  GtkTreeView::odd-row-color = "blue"   }


class "GtkTreeView" style "treeview"


to a gtkrc file to get the colors you want.


Jason



--
Jason Burchfield
CAS, Inc.
(256) 971-6096
Jason.Burchfield at cas-inc dot com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]