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ęcy złotych taniej? Przebieraj wśród tysięcy ogłoszeń!
Sprawdz >>> http://linkint.pl/f26b3

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

Reply via email to