Re: setting background and foreground colors

It seems that you're mixing Gtkmm and Gdk.

You should try something like that :

Gdk::Color my_blue;
viewer->modify_bg(Gtk::STATE_NORMAL, my_blue);


On 27/01/11 21:23, Charles Seedle wrote:
I got this particular piece of code to compile but it doesn’t change the
colors. Any ideas ?

Randy Seedle

Glib::RefPtr<Gdk::Window> win = viewer->get_root_window();

Glib::RefPtr<Gdk::GC> some_gc = Gdk::GC::create(win);

GdkColor my_blue;

GdkColor my_gray; = 0xc900; = 0xca00; = 0xc800; = 0x0000; = 0x7200; = 0xc800;

gtk_widget_modify_bg( GTK_WIDGET(&win), GTK_STATE_NORMAL, &my_blue );

gtk_widget_modify_fg( GTK_WIDGET(&win), GTK_STATE_NORMAL, &my_gray );

gtkmm-list mailing list
gtkmm-list gnome org

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