pushbutton with pixmap

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
pushbutton with pixmap

Submitted by wwf on Fri, 01/11/2002 - 06:22. Developers
i want to create a pushbutton with pixmap on it
instead word.
i know a method which use
XmGetPixmap(...,"xxx.pm",..,...);
xxx.pm is a file of xpm.
my question is that if I dont want to use the file,
and i want to write the information of xxx.pm
in the program ,and How can i do?
thank you !
Do you give me a favor ,dbl?

ICS_support

How can I resist a personal request?

Yes, you can do this.

The XPM (X PixMap) format is a text format for small pixmaps, suitable for using in the way that you describe (as the XmNlabelPixmap of an XmPushButton, or in an XmDrawnButton). The text format is easy to construct by hand; you can also use the "pixmap" program available on ftp.x.org, which produces XPM pixmaps in the same way that the standard "bitmap" program produces X11 XBM files.

The text format of the XPM files can be C-included right in your program. If you have "pixmap" produce a file "fouwing.h", you can then

#include "fouwing.h"

in your program and then use the XPM calls to create a pixmap with the data value fouwing_bits.