Re: How to change color of Gtk::RadioButton's label?



On Tue, 2005-12-20 at 08:55 -0600, Bob Caryl wrote:
> Hello Marco,
> 
> If the Pango::Layout is not useable for a Gtk::Label, then why oh why
> does Gtk::Label::get_layout exist?  If Pango cannot be used to display a
> Gtk::Label's text, then why in the wide wide world is the method listed
> in the Gtk::Label documentation with the comment:  "Get's the
> Pango::Layout used to display the label."
> 
> My research shows that Gtk::Button does not have this method
> specifically, nor does it exist in its ancestry.  Incidentally,
> Gtk::EventBox also lacks get_layout specifically or in its ancestry.

very unsuprising, these are not widgets designed to display text (though
they can be used to do so in various ways.)

> So, it appears that I'm back to either obtaining a handle to the button
> class's internal label widget, or creating and adding my own label to
> the button (which inexplicably has not worked for me so far.)
> 
> Marco, I greatly appreciate your efforts here, but I cannot help but
> believe that this can be done somehow with Pango.

there are ways of drawing a Pango layout that would pay attention to the
atttributes you are trying to set. however, these are not the ways that
are used by a Gtk::Label in its expose event handling.

Pango has many more uses than just Gtk::Label, and some of those other
uses will use those attributes. Pango is usable outside of GTK entirely,
for example.

--p





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