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



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?

Best regards,

Bob Caryl

Volosatov Alexander wrote:

>Yes, thanks, this is much better.
>
>  
>
>>On Mon, 19 Dec 2005 18:20:27 +0300 (MSK), Volosatov Alexander  
>><rope-walker yandex ru> wrote:
>>
>>    
>>
>>>But I compile and run this code!!! It work, but it's not universal!
>>>In my class users past they strings.
>>>And active step, done step ... have different attributes.
>>>So I must use Pango, but it give me CRItical Error.
>>>I need Pango tutorial.
>>>And if you wish, I can send code of class.
>>>
>>>Alex.
>>>      
>>>
>>Maybe this will better suit your needs.
>>
>>#include <gtkmm.h>
>>
>>int main(int argc, char**argv)
>>{
>>  Gtk::Main kit(argc, argv);
>>
>>  Gtk::Window win;
>>  Gtk::CheckButton check;
>>  Gtk::Label* l=Gtk::manage(new Gtk::Label);
>>  l->set_text("blue text");
>>  l->modify_fg(Gtk::STATE_NORMAL , Gdk::Color("blue"));
>>  check.add(*l);
>>  win.add(check);
>>  win.show_all_children();
>>  kit.run(win);
>>
>>  return 0;
>>}
>>    
>>
>_______________________________________________
>gtkmm-list mailing list
>gtkmm-list gnome org
>http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>  
>



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