home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!bogus.sura.net!howland.reston.ans.net!usc!sol.ctr.columbia.edu!ursa!buzz
- From: buzz@bear.com (Buzz Moschetti)
- Newsgroups: comp.windows.x.motif
- Subject: Re: Pixmaps for buttons in an option menu
- Message-ID: <BUZZ.93Jan28085328@lion.bear.com>
- Date: 28 Jan 93 13:53:28 GMT
- References: <C1Jrxv.HwC@news2.cis.umn.edu>
- Sender: news@bear.com
- Reply-To: buzz@bear.com (Buzz Moschetti)
- Organization: Bear, Stearns & Co. - FAST
- Lines: 24
- In-reply-to: moses@ahpcrc.umn.edu's message of 28 Jan 93 04:46:41 GMT
-
- In article <C1Jrxv.HwC@news2.cis.umn.edu> moses@ahpcrc.umn.edu (Matthew E. Moses) writes:
-
- Does any one know if you can substitute pixmaps on the buttons for an
- option menu?
-
- Sure can. The buttons are regular ol' PushButtons or PushButtonGadgets
- so you can do:
-
- Pixmap pp;
-
- XtVSetValues(button_in_menu_widget,
- XmNlabelType, XmPIXMAP,
- XmNlabelPixmap, pp,
- NULL);
-
- If you want to use the vararg type converter, remember that only
- X11 standard bitmap files can converted. XPM and other formats
- require separate calls to generate the pixmap. Example:
-
- XtVSetValues(button_in_menu_widget,
- XmNlabelType, XmPIXMAP,
- XtVaTypedArg, XmNlabelPixmap, XmRString,
- "filename", strlen("filename") + 1,
- NULL);
-