I want to change the background color of a Gtk::Button, but I simply can
not do it :-(

int main(int argc, char *argv[])
{
    auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example");

    Gtk::Window window;

    Gtk::Button button("Some text");
    window.add(button);

    Gdk::RGBA color;
    color.set_rgba(0xff,0x00,0x00);
    //button.override_color(color); // this will change the text color
    button.override_background_color(color); // this change nothing :-(


    window.show_all_children();

    return app->run(window);
}

Is there any chance to set the background color? The online docs did not
say anything...
https://developer.gnome.org/gtkmm/stable/classGtk_1_1Button.html
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to