Re: Setting widget background during widget creation?
- From: muppet <scott asofyet org>
- To: Martin Junius <mj+gnome ml m-j-s net>
- Cc: gtk-perl-list gnome org
- Subject: Re: Setting widget background during widget creation?
- Date: Sun, 10 Oct 2004 11:30:55 -0400
On Oct 10, 2004, at 5:58 AM, Martin Junius wrote:
Is there an easy way to set a widget's background during widget
creation, ie before the widget is realized?
what kind of background -- a color or a pixmap?
if you want to set a pixmap, there's no escaping the requirement that
the widget be realized, because you have to have the GdkWindow in order
to get the correct depth and screen for the pixmap. you can force the
widget to realize by calling $widget->realize before calling ->show.
if you just want to set a color, then you can use $style->modify_bg().
http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-
modify-bg
--
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.
-- President George W. Bush
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]