I finally did figure out how to change the color of a Gtk::Statusbar. I eventually resorted to digging through the gtkmm and gtk source code to find out how exactly how the statusbar is made, and then I did it by modifying the underlying Gtk Object. It goes something like this:

#include <gtk/gtk.h>
#include <gtkmm.h>

GdkColor        _cgtk_color;
GtkWidget*      _cgtk_label;
gdk_color_parse("Red", &_cgtk_color);
_cgtk_label = _StatusBar.gobj()->label;
gtk_widget_modify_fg(GTK_WIDGET(_cgtk_label), GTK_STATE_NORMAL, &_cgtk_color);

It's not pretty at all, I know, but it really gets the job done. In this example I have a Gtk::Statusbar called _StatusBar, and <gtk/gtk.h> has to be included at the top of the file to prevent an illegal forward declaration by gtkmm.h.

Thanks a million to "js" for helping me figure this out.
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to