Re: [gtk-list] Gtk-Perl and Pixmaps



Dr Noonian Soong wrote:
> 
> $window = new Gtk::Window -toplevel;
> ($pixmap, $mask) = Gtk::Gdk::Pixmap->create_from_xpm($window, #line 7
>                          $window->style->bg('normal'), 'pixmaps/test.xpm');
> show $window;
> 
> main Gtk;
Hi, I think that you must $windowe->realize() before you can use it in 
this way.

There is, apparently, a better way. I have read that it is better to use the
perl equivalent of the C code below (from Damon Chaplin)

   GdkColormap *colormap;

   colormap = gtk_widget_get_colormap (widget);
   gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask,
                                                    NULL, "new.xpm");


HTH, Dermot



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