GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Jul 29, 2014 6:51 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: gtk(mm) 3 button background color change
PostPosted: Sat Jan 21, 2012 12:15 am 
Offline
Familiar Face

Joined: Fri Nov 28, 2008 7:54 am
Posts: 38
Location: Italy, Milan
Hi, I'm trying to change the background of a button but it doesn't seem to work.
I paste the example code.
If anybody can tell me how to fix my code please help.
Code:
#include <gtkmm.h>

// g++ simple.cc -o simple `pkg-config gtkmm-3.0 --cflags --libs`

int  main(int argc, char *argv[])
{
    Gtk::Main kit(argc, argv);
    Gtk::Window  window;
    Gtk::Button  button("TEST");
    button.override_background_color(Gdk::RGBA("red"));
    window.add(button);
    window.show_all();
    Gtk::Main::run(window);
    return EXIT_SUCCESS;
}

_________________
my projects:
http://giuspen.com/cherrytree
http://giuspen.com/x-tile
http://giuspen.com/nautilus-pyextensions


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group