Re: How to change color of Gtk::RadioButton's label?
- From: Bob Caryl <bob fis-cal com>
- To: Marco Scholten <mscholtn xs4all nl>
- Cc: gtkmm-list gnome org
- Subject: Re: How to change color of Gtk::RadioButton's label?
- Date: Tue, 20 Dec 2005 08:55:23 -0600
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.
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.
Bob
Marco Scholten wrote:
>> Hey Everyone,
>>
>> It appears that setting the label foreground text color of the check
>> button widget suits Volosatov's purpose. However, I was trying to
>> figure out how to set the *background* color in the check button widget
>> label; and in that, I was not successful. It appeared to me that I
>> should have been able to do it using Pango, but I was not able to get a
>> valid attribute list from the Pango layout derived from the widget. Can
>> anyone point me at some doc resource from which I might glean the answer
>> to this question?
>>
>> Perhaps my question is best suited for the gtk+ list?
>>
>
> Remember that a label does not have a Gdk::Window so you will have to
> put it inside an eventbox and change the background of the eventbox.
>
> hope this helps.
>
> --
> Marco
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]