Re: pixmap question...
- From: Tom Bech <tomb ii uib no>
- To: gtk-list redhat com
- Subject: Re: pixmap question...
- Date: Sat, 25 Jul 1998 10:06:02 +0000
Jason A. Pfeil wrote:
>
> Hmmm...for some reason in C, when I attempt to create a pixmap, I get the
> following warning:
>
> ** WARNING **: Creating pixmap from xpm with NULL window and colormap
>
> I am following the example in the tutorial on how to add a pixmap to a
> button with this process:
>
> 1) create a box to hold the pixmap
> 2) create the gdk pixmap with the box's window
> 3) create the pixmap widget from the gdk pixmap
> 4) add the pixmap widget to the box
> 5) add the box to the button
>
You have to do a gtk_widget_realize (container) before
you can use it tp create your GdkPixmap. Before you do that,
there's no X window or colormap associated with the widget -
this results in the warning above.
Have a look at /foo/gtk+/gtk/testgtk.c for an additional
example of using pixmaps in widgets.
Tom
--
tomb@gimp.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]