Re: RE: Changing color/style on a scrollbarinaGtkScrolledWindow
| From: | dpgirago at mdanderson dot org | Date: | Mon, 02 Aug 2004 16:36:47 +0000 |
| Subject: | Re: RE: Changing color/style on a scrollbarinaGtkScrolledWindow | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-4915@lists.php.net to get a copy of this message | ||
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