Re: [gtk-list] updating pixmaps



>>>>> "Michael" == Michael Elkins <michael@tis.com> writes:

    Michael> I am attempting to write a simple game to teach myself
    Michael> GTK+.  What I have is basically an array of pixmaps
    Michael> inside of a fixed widget for display and so I can catch
    Michael> mouse presses on the pixmaps.  The problem is that when I
    Michael> update the pixmaps on the widgets other than the one that
    Michael> was pressed using gtk_pixmap_set(), it overwrites the old
    Michael> image without clearing it first.  However, if I iconify
    Michael> the window and bring it back up, it correctly redraws the
    Michael> updated pixmap.  Can somone tell me what I am doing wrong
    Michael> here?
Probably this is a bug in the pixmap widget. I discovered the same
problem a few days ago. Use the following trick to avoid this problem:

gtk_widget_hide (pw);
gtk_pixmap_set (GTK_PIXMAP (pw), pixmap, mask);
gtk_widget_show (pw);

Ullrich
-- 
Ullrich Hafner           <hafner@informatik.uni-wuerzburg.de>
Department of Computer Science, University Wuerzburg, Germany
URL:  http://www-info2.informatik.uni-wuerzburg.de/staff/ulli



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