Re: Background color of a Window

Ed Stafford wrote:

This is more of a nit-pick thing than anything, but
I'm wanting to change the background color of a
top-level window to white.  Does anyone know how I can
do this?
Hi, I haven't tried this but I guess that a generic solution is:

  my $style = new Gtk::Style;
  my $cm = $widget->get_toplevel->window->get_colormap;
  $style->bg('normal', $cm->color_alloc({red=>65000, green=>0, blue=>0}))

to set it to a red background.

Regards, Dermot

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