Widget::modify_xxx vs. Widget::get_style()->set_xxx
- From: Joaquim Schmidlap <schmidlap schmidlap org>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Widget::modify_xxx vs. Widget::get_style()->set_xxx
- Date: Thu, 17 Jan 2008 10:43:34 -0600
I've been struggling for a few days with a problem which I finally
figured out, but would like to understand.
Given, say, a TreeView, where you want to change the background color:
Gtk::TreeView tree;
tree.modify_fg(Gtk::STATE_NORMAL, Gdk::Color("white")); // works
tree.get_style()->set_fg(Gtk::STATE_NORMAL, Gdk::Color("pink")); //
has no effect
Disregarding, for the moment, the conversation about "Style values
should be set by the user", can someone explain to me which widgets
respect the Style objects returned by get_style(), if any, and which
don't? More generally, is there a guideline to knowing the difference?
Or, do I fundamentally misunderstand the reason for and use of the
(apparently) contained Style object in Widgets?
A pointer to documentation would be great, too. Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]