Re: Canvas background color



>On 4/18/05, KC <kcc1967 gmail com> wrote:
>> Hi,
>>=20
>> How can I change background color of gnome canvas ?
>> I know I should probably use GtkStyle ... but I didn't success yet.
>> Any workable code example is appreciated.
>
>I'm not sure about GnomeCanvas, but normally you would use
>gtk_widget_modify_bg() and then use GTK_STATE_NORMAL as the state
>type.

	gtk_widget_set_name (canvas, "YourName");

and then in a gtk rc file:
    
        style "your_style" 
	{
	      bg[NORMAL] = { 0.34, 0.28, 0.19 }
        }

        widget "*YourName" style "your_style"

*much* more flexible, much nicer for users.

--p



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