Unable to set background color for button
- From: Klaus Rudolph <lts-rudolph gmx de>
- To: gtkmm-list gnome org
- Subject: Unable to set background color for button
- Date: Wed, 4 Mar 2020 18:48:04 +0100
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
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]