Search code examples
c++gtk3gtkmm

can gtkmm change the css property of a class programmatically?


Gtk::StyleContext has methods for adding and removing a CSS class. Can I change the property of this class programmatically?


Solution

  • Yes, sort of; you can load another CSS file in the style context's CSS provider, that has different rules for that CSS class.

    I suspect you might be asking about how to go into the rules directly and edit them programmatically; you can't do that.