Re: [gtk-list] pixmaps on buttons ???



Sergei Naumov <serge@astro.unc.edu> writes:

> Hi!
> I have this piece of code that is supposed to put a pixmap on my button:
[snip]
> It does it all right but when running it tells me this:
> 
> 	** WARNING **: Creating pixmap from xpm with NULL window and colormap
> 
> What is it I am doing wrong here? Thanks in advance,

Hi. I'm just learning gtk+, and I had the same problem using the
xpm_label function given in the examples (it does the same as your
program). The solution was to call gtk_widget_realize (or something
similar) on the new object. Don't ask me why it works, but it does!

You should read the testgtk.c example which comes with gtk+: it is
a good reference on how to use all the functions together, which is
not always obvious with only the info reference.

-- 
Pierre-Charles David (david@essi.fr) ESSI - Sophia Antipolis



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