home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / motif / 8890 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.2 KB

  1. Path: sparky!uunet!ukma!bogus.sura.net!howland.reston.ans.net!usc!sol.ctr.columbia.edu!ursa!buzz
  2. From: buzz@bear.com (Buzz Moschetti)
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Re: Pixmaps for buttons in an option menu
  5. Message-ID: <BUZZ.93Jan28085328@lion.bear.com>
  6. Date: 28 Jan 93 13:53:28 GMT
  7. References: <C1Jrxv.HwC@news2.cis.umn.edu>
  8. Sender: news@bear.com
  9. Reply-To: buzz@bear.com (Buzz Moschetti)
  10. Organization: Bear, Stearns & Co. - FAST
  11. Lines: 24
  12. In-reply-to: moses@ahpcrc.umn.edu's message of 28 Jan 93 04:46:41 GMT
  13.  
  14. In article <C1Jrxv.HwC@news2.cis.umn.edu> moses@ahpcrc.umn.edu (Matthew E. Moses) writes:
  15.  
  16.    Does any one know if you can substitute pixmaps on the buttons for an
  17.    option menu?
  18.  
  19. Sure can.  The buttons are regular ol' PushButtons or PushButtonGadgets 
  20. so you can do:
  21.  
  22.     Pixmap pp;
  23.  
  24.     XtVSetValues(button_in_menu_widget,
  25.             XmNlabelType,    XmPIXMAP,
  26.             XmNlabelPixmap,  pp,
  27.             NULL);
  28.  
  29. If you want to use the vararg type converter, remember that only
  30. X11 standard bitmap files can converted.  XPM and other formats 
  31. require separate calls to generate the pixmap.  Example:
  32.  
  33.     XtVSetValues(button_in_menu_widget,
  34.             XmNlabelType,    XmPIXMAP,
  35.             XtVaTypedArg, XmNlabelPixmap, XmRString,
  36.                 "filename", strlen("filename") + 1,
  37.             NULL);
  38.