[pygtk] XPM data
John Finlay
finlay at moeraki.com
Fri Apr 23 11:23:48 WST 2004
jromero wrote:
>I have an icon XPM from date (icon_xpm ) [...]) inside the code of the
>application.
>
>I want to use these icon in a gtk.Toolbar(), but the problem is:
>
>------------------------------------------------------------------
>icon_xpm = [ ... ]
>...
>toolbar.append_item('Reflejar','Reflejar imagen', None, icon_xpm,
>callback, None)
>------------------------------------------------------------------
>
>And rise the error:
>
>[joaquin at quino ImageViewer]$ ./imageviewer.py
>Traceback (most recent call last):
> File "./imageviewer.py", line 270, in ?
> herramientas = CreaBarraHerramientas(mainwindow)
> File "./imageviewer.py", line 151, in CreaBarraHerramientas
> toolbar.append_item( 'Reflejar -', 'Reflejar la imagen
>horizontalmente', None, icon_xpm, gtk.mainquit, None)
>TypeError: forth argument must be a GtkWidget or None
>[joaquin at quino ImageViewer]$
>
>
>
>How I can to introduce the icon in my toolbar?
>
>_______________________________________________
>pygtk mailing list pygtk at daa.com.au
>http://www.daa.com.au/mailman/listinfo/pygtk
>Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
>
Look at the example here for one way:
http://www.pygtk.org/pygtk2tutorial/sec-Toolbar.html
And there's probably something in the FAQ.
John
More information about the pygtk
mailing list