Re: Colors in Gtkmm




According to the gtkmm documentation.
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Label.html

void Gtk::Label::set_markup     (   const Glib::ustring &        str     )

Parses str which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results.

Best, Elcio







"Aaron Geier" <ageier catalystmicro com>

24/08/2007 15:29 CST

       
        Para:        <elciof bb com br>
        cc:        
        Assunto:        RE: Colors in Gtkmm




Hello,

Your suggestion works.

Is there documentation on the mark up language used in gtkmm, or is it just standard xhtml?

Thanks,

Aaron Geier
 



From: elciof bb com br [mailto:elciof bb com br]
Sent:
Friday, August 24, 2007 3:19 PM
To:
Aaron Geier
Subject:
Re: Colors in Gtkmm

 

I know that you can change properties of labels and other GTK objects with the method set_markup.

GtkLabel::set_markup(str)


In the param <str> you can put a xml tag to the text.

Ex:

GtkLabel *gtk_obj;

gtk_obj->set_markup("<big> Hello World </big>")        // works


You can try to put color properties inside xml in the set_markup method parameter.

gtk_obj->set_markup("<span color='blue' Button Group Demo</span>") // i didn't test, but I think it works


Elcio



 

"Aaron Geier" <ageier catalystmicro com>

Enviado Por: gtkmm-list-bounces gnome org

24/08/2007 14:43 CST

       
       Para:        <gtkmm-list gnome org>

       cc:        

       Assunto:        Colors in Gtkmm





Hello again,

I have some questions on implementing colors (font color, background color etc.)

I have used the TextView and TextBuffer and the tags that go along with those items to change things like background colors and what not.

My question is: are colors configurations limited only to those items?  Is it possible to change the font color/background color of a label, entry, or colors of the rows in a TreeView?

 
Thanks in advance,
Aaron Geier

_______________________________________________
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]