home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / motif / 8277 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  1.7 KB

  1. Path: sparky!uunet!contex!felix.contex.com!avinash
  2. From: avinash@felix.contex.com (Avinash Chopde)
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Re: Is it possible to get at FileSelectionBox PushButtons?
  5. Summary: no, using Gadget is not the answer, the answer is ...
  6. Message-ID: <3243@contex.contex.com>
  7. Date: 31 Dec 92 15:27:42 GMT
  8. References: <3238@contex.contex.com>
  9. Sender: news@contex.contex.com
  10. Lines: 33
  11.  
  12. In article <3238@contex.contex.com>, avinash@sam.contex.com (Avinash Chopde) writes:
  13. > For some strange reason (:-)), I need to make the pushbuttons
  14. > on the FileSelectionBox widget respond to Button 2.
  15. > Assuming I only have a FSB in some application, I thought this would
  16. > work:
  17. > *XmPushButton.translations: #override\
  18. >     <Btn2Down>,<Btn2Up>:    Activate() Disarm() \n\
  19. >     <Btn2Down>:    Arm()
  20.  
  21. Well, I received many replies to use XmPushButtonGadget instead of
  22. XmPushButton, but of course, that will not work, since Gadgets do not
  23. have translations associated with them. But, that led me to the right
  24. solution: install translations for the Manager widgets, which will
  25. activate the Gadgets:
  26.  
  27. *XmFileSelectionBox.translations: #override \n\
  28.     <Btn2Down>,<Btn2Up>:    ManagerGadgetActivate() \n\
  29.     <Btn2Down>:    ManagerGadgetArm() \n\
  30.     <Btn2Up>:    ManagerGadgetActivate()
  31.  
  32. The above works correctly.
  33. Similarly, for the MessageBoxes, one may use:
  34.  
  35. *XmMessageBox.translations: #override \n\
  36.     <Btn2Down>,<Btn2Up>:    ManagerGadgetActivate() \n\
  37.     <Btn2Down>:    ManagerGadgetArm() \n\
  38.     <Btn2Up>:    ManagerGadgetActivate()
  39.  
  40. Thanks to everyone for the pointers that led me to the solution...
  41. -- 
  42. ---------------------------
  43. Avinash Chopde         office : 617 246 1776x5582
  44. avinash@contex.com     (...!uunet!contex!avinash)
  45.