Re: Text-Selection Color



On Thu, 2010-06-17 at 16:32 +0200, Dominik Gabi wrote:
> Hi,
> 
> I'm trying to get the color of selected text or the color of a selected 
> cell in Gtk::TreeView. So far I've tried various combinations with 
> get_xx(Gtk::StateType) and Gtk::STATE_XX in Gtk::Style but I seem to be 
> unable to figure out the right combination. The obvious one, 
> get_text(Gtk::STATE_SELECTED), does not return the color from my current 
> theme. Any hints? Am I even looking in the right place?

I think Gtk::CellRenderer::property_background() and
Gtk::CellRenderer::property_foreground() would work.  In other words,
getting the cell renderer of the column and then working with the two
properties.

-- 
José



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