Re: base property of GtkStyle

From: Date: Thu, 15 Mar 2007 15:44:33 +0000
Subject: Re: base property of GtkStyle
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7750@lists.php.net to get a copy of this message
Andre Colomb wrote: > > I am using a GtkTextView widget in my application, which by default has > a white background. Now I want it to show up like a GtkLabel, with the > usual "gray" background color. I can set a new GdkColor using the > modify_base method, however I can not figure out how to access the > default background (or base) color. > > If you know a better way to make the textview widget blend in with the > background (even when using themes), please tell me about it... > > Hi Andre, First get the default bg color of the window with: $org_bg = $window->get_style()->bg[Gtk::STATE_NORMAL]; Then set the background of the gtktextview with: $view->modify_base(Gtk::STATE_NORMAL, $org_bg); You could find a sample code and more explanation at: http://www.kksou.com/php-gtk2/articles/set-GtkTextView-to-look-like-GtkLabel.php Regards, /kksou -- View this message in context: http://www.nabble.com/base-property-of-GtkStyle-tf3407991.html#a9497308 Sent from the Php - GTK - General mailing list archive at Nabble.com.

« previous php.gtk.general (#7750) next »