RE: [PHP-GTK] RE: Changing color/style on ascrollbarinaGtkScrolledWindow

From: Date: Mon, 02 Aug 2004 18:13:02 +0000
Subject: RE: [PHP-GTK] RE: Changing color/style on ascrollbarinaGtkScrolledWindow
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4917@lists.php.net to get a copy of this message
Steph - I'm using Win98, and I don't see any effect from this code at all. It doesn't blow up on us, the way some of our other attempts at style have; it just doesn't change our scroll window at all. What could I be missing? Madeleine D. At 05:52 PM 8/2/2004 +0100, you wrote: >Weird. It worked for me under win98. > -----Original Message----- > From: dpgirago@mdanderson.org [mailto:dpgirago@mdanderson.org] > Sent: 02 August 2004 17:37 > To: php-gtk-general@lists.php.net; steph@zend.com; mmdrake@bctonline.com; >malko@the-ring.homelinux.net > Subject: Re: [PHP-GTK] RE: Changing color/style on a >scrollbarinaGtkScrolledWindow > > > > Steph,Madeleine, Malko, thanks very much for your input. > > I originally tried to get the style from the GtkScrolledWindow widget, and >then tried to set it just as you showed in your example, Steff. > > > $style = $scrolledWin->style; > > $red = new GdkColor('#FF0000'); > > $green = new GdkColor('#00FF00'); > > $blue = new GdkColor('#0000FF'); > > $style->bg[GTK_STATE_NORMAL] = $red; > > $style->bg[GTK_STATE_PRELIGHT] = $green; //slider hover > > $style->bg[GTK_STATE_ACTIVE] = $blue; //trough > > $scrolledWin->set_style($style); > > Unfortunately, as Madeleine suggests, this does not give the expected >results. In fact, the results were so confounding that I abandoned this >approach and only then pursued the vadjustment thingy. > > But I did re-review the manual page for GtkStyle(), and by using -- $style >= gtk::widget_get_default_style() -- > I was able to change the background color for the entire window, >scrollbars, clist column headers, etc... So success was evetually achieved >;~) > > Although I don't want to prolong what seems to be a less than thrilling >thread, I am curious as to whether others have been able use something like >Steph's example to specifically change colors of scrollbars and clist column >headers. It simply didn't work for me. As I'm on Win2k, I can't help but >wonder whether this might be a consideration, cross-platform functionality >notwithstanding. > > I will add a comment to the Wiki about my experience. > > Thanks, again, everyone. > > dave >

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