[Gtk-sharp-list] Can't set Label background color

Archie Maskill galepsus at gmail.com
Tue Oct 25 06:48:32 EDT 2005

On 10/25/05, László Monda <mondalaci at gmail.com> wrote:
> Hi Gtk# Masters,
> I tried to set the background of a Label widget, using
> Widget.ModifyBase(StateType, Gdk.Color) and Widget.ModifyBg(StateType,
> Gdk.Color) with no success.

You can't set the background color of a Label directly - something to
do with it not being a window widget.  It can, however, inherit the
background color of its parent.  So instead, you can put the label
into an EventBox and change the background color of the EventBox using

- Archie

More information about the Gtk-sharp-list mailing list