home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!contex!felix.contex.com!avinash
- From: avinash@felix.contex.com (Avinash Chopde)
- Newsgroups: comp.windows.x.motif
- Subject: Re: Is it possible to get at FileSelectionBox PushButtons?
- Summary: no, using Gadget is not the answer, the answer is ...
- Message-ID: <3243@contex.contex.com>
- Date: 31 Dec 92 15:27:42 GMT
- References: <3238@contex.contex.com>
- Sender: news@contex.contex.com
- Lines: 33
-
- In article <3238@contex.contex.com>, avinash@sam.contex.com (Avinash Chopde) writes:
- > For some strange reason (:-)), I need to make the pushbuttons
- > on the FileSelectionBox widget respond to Button 2.
- > Assuming I only have a FSB in some application, I thought this would
- > work:
- > *XmPushButton.translations: #override\
- > <Btn2Down>,<Btn2Up>: Activate() Disarm() \n\
- > <Btn2Down>: Arm()
-
- Well, I received many replies to use XmPushButtonGadget instead of
- XmPushButton, but of course, that will not work, since Gadgets do not
- have translations associated with them. But, that led me to the right
- solution: install translations for the Manager widgets, which will
- activate the Gadgets:
-
- *XmFileSelectionBox.translations: #override \n\
- <Btn2Down>,<Btn2Up>: ManagerGadgetActivate() \n\
- <Btn2Down>: ManagerGadgetArm() \n\
- <Btn2Up>: ManagerGadgetActivate()
-
- The above works correctly.
- Similarly, for the MessageBoxes, one may use:
-
- *XmMessageBox.translations: #override \n\
- <Btn2Down>,<Btn2Up>: ManagerGadgetActivate() \n\
- <Btn2Down>: ManagerGadgetArm() \n\
- <Btn2Up>: ManagerGadgetActivate()
-
- Thanks to everyone for the pointers that led me to the solution...
- --
- ---------------------------
- Avinash Chopde office : 617 246 1776x5582
- avinash@contex.com (...!uunet!contex!avinash)
-