Re: [gtkmm] switching styles impossible?



Hi,

* RevX gmx at <RevX gmx at> [2002-07-26 17:03:32]:
> I'm using gtkmm 1.2.8 and I'd like to know if it's possible to
> apply a style to a widget (ie. a button) AFTER the widget
> got show()'n?! And if yes, how? Is it possible to switch
> styles for a widget? (I've tried to simply apply a style
> to a button after the ctor call but that just leads to a segfault.)

Try something like:

    Gdk_Color color("white");
    Gtk::Style *style = Gtk::Style::create();
    style->set_fg(GTK_STATE_NORMAL, color);
    button.set_style(*style);

  - Morten.

--
http://wtf.dk/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]