home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.motif
- Path: sparky!uunet!ulowell!koverber
- From: koverber@cs.ulowell.edu (Kurt Overberg)
- Subject: Re: How to break "Return" laws in a Text widget...
- Message-ID: <BzpxBw.4Iq@ulowell.ulowell.edu>
- Originator: koverber@bigmax.ulowell.edu
- Sender: usenet@ulowell.ulowell.edu (News manager - ulowell)
- Organization: University of Massachusetts at Lowell Computer Science
- References: <1992Dec23.002819.593@bostech.com>
- Date: Wed, 23 Dec 1992 15:21:31 GMT
- Lines: 42
-
-
- Unfortunately, Motif has no way to break the translations. You
- have to drop down to the Xt level. Using translations you can
- remap keys to specific action routines. It would look
- something like this (this could go in your .Xdefaults file:
-
- myApp*textfield.translations: #override \n\
- <Key>Return: process-tab()
-
- You just want to tell your application that when Return gets
- pressed in this field, you want to do a tab instead of
- process-return() (which normally gets called). If your text
- widget is in a Bulletin Board, you MIGHT have to set
- XmNautoUnmanage to False, but Im not sure, because I always
- set it to False.
-
- As for your other problem, I too have had great difficulty
- making sure that the keybindings in Motif always did what
- they were supposed to do. I have had my keybindings stop
- working in the middle of running the program! They just
- all stopped working! Wierd stuff. I have had the most
- luck just setting all the translations explicitly by hand.
- I would advise getting the Motif Programmer's Reference
- book, because it gives all the default action routines
- that get called for all the keys (del, backspace, pgup, etc).
- Just setting them explicitly has worked better than relying
- on Motif to set them for me. (although this only works 1/2 of
- the time!) Welcome to the wonderful world of Motif KeyBindings!
- Good luck!
-
- Happy Holidays!
-
- peace out.
-
-
- kurt
-
- --
- Kurt Overberg | Opinions expressed here are MINE!
- U of Mass, Lowell | "Poke a double-decker on a Llama taboot,
- koverber@cs.ulowell.edu | Llama taboot, taboot!" -Phish
-
-