I create application in GTK+3 and I Would like to change the background color for GtkBox
but can not here this code:
box.modify_bg(Gtk.StateType.NORMAL, color);
I create application in GTK+3 and I Would like to change the background color for GtkBox
but can not here this code:
box.modify_bg(Gtk.StateType.NORMAL, color);
In "Common Questions" of GTK+3 is the answer to your question.
In the basic form, you can use:
box.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(.5,.5,.5,.5))
In this case, the color will be a soft grey, half transparent. Probably, you want to paint it during the draw
signal.
© 2022 - 2024 — McMap. All rights reserved.