TreeView row selection problem



Good morning everyone;
I have a treeview featured application that diplays data on different
row with varied foreground color scheme.  The  foregrounds looks just
fine upto/ until whenever a selection is done. 
For instance, let say the foreground color of a given row is red... when this particular row is selected (highlighted) the foreground seem to be white instead of red. 
I don't know if this behavior is gtk related or not... because recently before I upgraded my 2.4 gentoo box to 2.6, I used to get the proper behavior.
Please, see the screenshots for a better understanding of what I'm talking about. 
Here is the screenshot of the appl:
ran on an older server -> http://www.ezclick.net/~jeff/gtkmm/s0.png
The following two were ran under my new server - > http://www.ezclick.net/~jeff/gtkmm/s1.png
Notice when the row is not selected or is diselected you can see I got the colors -> http://www.ezclick.net/~jeff/gtkmm/s2.png
Also, here is my code snip:
/* Description: ADD FOREGROUND COLOR PROPERTY TO THE ROWS.
   The last column appended to the tree view tells us the total number of columns.  
   In our case, all of the columns are CellRendereText.

   Loop through the columns and tell each column's cellrenderer to use the
   value in the color column to change the foreground_gdk property for the row.

for each column in the treeview */ 
for (int i = 0; i < cols_count; i++)
{
   Gtk::TreeViewColumn* pColumn = m_TreeView->get_column(i);
   if (pColumn)
   {
      // Get the cellrenderer (assuming it's TEXT)
      Gtk::CellRendererText* pRenderer = static_cast
      <Gtk::CellRendererText*> (pColumn->get_first_cell_renderer());          
       
      // Tell the renderer to use the 'color' column to set the 
      // foreground_gdk color property.
      pColumn->add_attribute (pRenderer->property_foreground_gdk(), schedule_columns.color);
    }
}

By the way,  I'm using gtkmm-2.2.1 on both of my servers (old and new).
Also, I posted the same to the gtkmm list and they think this issue could be caused by changes in gtk+'s 
underlying routines.

Please, help... I would like to see/ keep this older behavior http://www.ezclick.net/~jeff/gtkmm/s0.png  

Thanks in advance.

Kinyanjui




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