Re: XForms: Hardcoded Pixmaps

Steve Lamont (
Tue, 29 Jul 97 06:25:42 PDT

To subscribers of the xforms list from (Steve Lamont) :

> I think it would be nice to have the pixmap hard-coded (option?)
> as the .xpm files are already in C syntax, that would solve
> the above problem in a natural way (IMHO) without using the
> 'data' functions (???).

The function fl_set_pixmapbutton_data() does what you want. I'm not
sure I understand why using it would be a somehow "unnatural" act.

The usage is as follows:

#include "some_pixmap.xpm"


fl_set_pixmapbutton_data( pixmap_button, some_pixmap );

assuming, of course, the standard construction of the include file

There are analogous functions for the other Pixmap objects.

> So, did I do something wrong? ...

Not read the manual carefully enough, perhaps? :-)

Actually, not really.

The manual should probably not assume that the reader has made the
inference that "unsigned char **bits" refers to the array of an Xpm
pixmap. While reference to the demo code is probably a Good Thing,
it's not always easilty available to J. Random Application Programmer.


To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: