Re: style exmple
| From: | Rich Payne | Date: | Thu, 23 Jan 2003 21:23:22 +0000 |
| Subject: | Re: style exmple | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2947@lists.php.net to get a copy of this message | ||
On Thu, 23 Jan 2003, Richard Gabriel wrote:
> Does anyone have an example of creating a new style and assigning it to
> a widget? I'm having some problems with that and an example would sure
> help.
$current_style=$clist->get_style();
$new_style = $current_style->copy();
$new_style->base[GTK_STATE_NORMAL]=$bg_color;
$new_style->fg[GTK_STATE_NORMAL]=$fg_color;
$new_style->bg[GTK_STATE_SELECTED]=$hb_color;
$new_style->fg[GTK_STATE_SELECTED]=$hf_color;
$clist->set_style($new_style);
> Also, how would I set the background color of a window?
Presumably you set the base property of it's style object.
--rdp
Rich Payne
http://talisman.mv.com
rdp at talisman dot mv dot com