On Mon, 24 Sep 2001, Skip Montanaro wrote:
> (I'm using the Gtk+ 2.0 API.)
>
> Given an xpm list such as
>
> arrow_down = [
> "8 8 17 1",
> " c #000000",
> ". c #160808",
> "X c #571D1D",
> "o c #9A3434",
> "O c #AE3A3A",
> "+ c #341111",
> "@ c #160707",
> "# c #591E1E",
> "$ c #9A3333",
> ...
> ]
>
> how do I create a GtkButton using that as the displayable image? I looked
> at the GtkPixmap reference page. It says
>
> The icon is typically created using gdk_pixmap_colormap_create_from_xpm()
> or gdk_pixmap_colormap_create_from_xpm_d().
>
> but I don't see either of those functions available via gtk or as methods of
> gtk.GdkPixmap. What's the procedure in the 2.0 API to create pixmaps?
You should be able to use the gtk.gdk.pixmap_colormap_create_from_xpm_d
function. There is also a gdk-pixbuf function for loading xpm data, but I
don't think it has been wrapped yet.
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk