Jacek,

In Gtk it is not common to alter the row color as it is controlled by the currently installed theme. I have had minor success with altering the appearance of widgets without changing the theme but it has been a frustrating task to say the least. I'm sorry I don't have a solution that is useful enough to pass on but I thought you may want to know that it is not common to go against the theme so it can be aggravating. But I will say your on the right path, try browsing Banshee's source code they have done quite a bit with TreeViews.

I hope this is at least a little helpful.

SpoodyGoon



On 5/9/2010 1:18 PM, Jacek Ruz.yczka wrote:
Hi folks,

I am fighting with a not-so-strange wish: I have a TreeView with a TreeStore
behind it, and now I wanna give a newly-inserted row (!!) a different
color...for instance, white letters on red background. For another TreeView
with ListStore, this code already works fine:

                private void MarkErrorRow (int row)
                {
                        foreach (TreeViewColumn column in 
this.itemTreeView.Columns) {
                                CellRendererText cell = (CellRendererText) 
column.CellRenderers [row];
                                cell.ForegroundGdk = new Color((byte) 0xFF, 
(byte) 0xFF, (byte) 0xFF);
                                cell.BackgroundGdk = new Color((byte) 0xFF, 
(byte) 0x00, (byte) 0x00);
                        }
                }

But when I try to use the same code in conjunction with a TreeStore, I always
get a crash 'cause the CellRenderers array only contains one single item.

Even worse: I really use the "tree" functionality of the TreeStore, and
sometimes I have to "paint" child rows, too.

Any suggestions?

Regards
Jacek

----------------------------------------------------------------------
Audi kilka tysiÄ^(TM)cy zÅ,otych taniej? Przebieraj wÅ>ród tysiÄ^(TM)cy 
ogÅ,oszeÅ"!
Sprawdz>>>  http://linkint.pl/f26b3


_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list


No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.819 / Virus Database: 271.1.1/2863 - Release Date: 05/09/10 
02:26:00

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to