Re: Set the background color in GTK1



On Fri, 9 Apr 2004, Kevin DeKorte wrote:
I have an application that I am working on that I need to set a GtkWidow's
background color. I have been able to do this in GTK2 pretty easily, but how
do I change in GTK1? I'm writing my app to work in both GTK1 and GTK2 because
it is a mozilla plugin and mozilla ships in both flavors.
Hello Kevin!
in GTK1 you can change the background color by modifying the GtkStyle of
the widget. I'm not sure how you have to do it detail, since I'm not
using GTK1 for quite a time. Try getting the current style with
gtk_widget_get_style(window), then modify the color and set the style back
to the widget with gtk_widget_set_style() and / or
gtk_widget_ensure_style().

Regards,
                     Peter
-- 
====================================================================
Peter Krüger

applied software solutions (appss) GmbH
Sandtorstr. 23
D-39106 Magdeburg
Germany

Phone:  +49-(0)391-54486-19388
Fax:    +49-(0)391-54486-19222
email:  krueger appss de
URL:    http://www.appss.de

Managing Director: Uwe Hess, Dietmar Schäfer
Register: HRB12386, AG Mageburg

"Virtual business becomes reality!"

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
====================================================================




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