Gtk_Pixmap



What is the best way to include a pixmap in a gtk-- app?  Here is the
method I
am using:

Gtk_VBox *pixmap_container = new Gtk_VBox();
Gtk_Pixmap *pixmap = new Gtk_Pixmap(pixmap_container, <insert XPM file
here>);
pixmap_container->add(pixmap);

Then, I pack the pixmap_container into a manager widget and do a
show_all() on
the window.  I am asking this for two reasons:

1) I don't like wasting a Gtk_VBox widget just to get a window to show
the
Gtk_Pixmap in.

2) Almost every other time the pixmap is rendered in the same execution
of the
program, it is "smeared".  It looks like it was displayed once, and then
shifted in position and displayed again.  If I cause the window to be
redrawn
by hiding the section of the window containing the pixmap and then
reexposing it,
then the pixmap comes out right.  This is annoying...any ideas?

Thanks in advance,

-- 
-------------------------------------------------------------------------------
Jason A. Pfeil, Computer Science Graduate Student  120 Carothers Hall
http://www.cs.fsu.edu/~pfeil			   Florida State University
pfeil@cs.fsu.edu				   (850)644-4019



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