Re: change background color for Gtk::fixed container



I used the second method and it works thank-you

On Thu, Jan 5, 2012 at 7:29 PM, Kjell Ahlstedt <kjell ahlstedt bredband net> wrote:
2012-01-05 03:59, kiet tran skrev:

hi everyone,

Is it possible to change the background of Gtk::fixed container I tried using modify_bg() function and it didnt do anything.
That modify_bg() works for a button widget and Gtk::window.

So is there any other method to do this.

Cheers,

Kiet Tran

Some widgets don't have their own Gdk::Window. They draw on their parent container's window. Some of those widgets don't draw their background. E.g. Gtk::Label does not draw its background. Probably Gtk::Fixed is also one of the widgets that don't draw their background. There are (at least) two solutions:
1. Change the background of Gtk::Fixed's parent container.
If that's not suitable, perhaps too much background is changed, then
2. Put the Gtk::Fixed in a Gtk::EventBox, and change the background color of the Gtk::EventBox.

Kjell




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