Background color in GtkText




I found this same question in the archives, but there was no response.  I
have also been through the FAQ, tutorials, docs, and source, and still no
luck.  What I need to know is how to set the background in a GtkEntry.
The testgtk app does it by gtkrc, but I need to be able to change it
inside the app.

I've figured out that by using:

gtk_text_insert( text, NULL, foreground, background, "foo", -1 );

I can set the background behind the letters as they're being entered, but
the rest of the window remains white.  I need to be able to also set the
normal white background to black or blue or red or whatever.

I also tried using the style method, by changing
style->bg[ GTK_STATE_NORMAL ] to background, but still had no luck.

Any help would be greatly appreciated.

Later,

Jeremy Wise
jwise@pathwaynet.com




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