Re: GtkButton bg color



Steve wrote:
Any chance you can provide an example of a button with a background
color?


    GdkColor colorGreen = { 0x0000, 0x90ff, 0xeeff, 0x90ff };

    // without mouse hovering
    gtk_widget_modify_bg( button, GTK_STATE_NORMAL, &colorGreen );
    // with mouse hovering
    gtk_widget_modify_bg( button, GTK_STATE_PRELIGHT, &colorGreen );

If this doesn't work, you must be using a GTK theme that is overriding
the coloring of widgets.



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