Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!uunet!dg!daver From: daver@dg.dg.com (David Rudolph) Newsgroups: comp.windows.x Subject: Re: Text widget question Keywords: Motif UIL Text Message-ID: <688@dg.dg.com> Date: 31 Jul 90 13:51:16 GMT References: <258@sps.com> Reply-To: daver@paint.dg.com (David Rudolph) Organization: Data General, Westboro, MA. Lines: 37 In article <258@sps.com> arm@sps.com (Annette Myjak) writes: > >Is there a reason why the RETURN key doesn't seem to do anything in a >multi-line Motif Text widget? (Specifically, it doesn't cause the input >cursor to go to the next line like one would expect.) The documentation >indicates that the translation table is set up for RETURN to perform a >newline(). > I have had this problem in Text widgets which were contained in dialog shells. It seems that when a Bulletin Board is the child of a dialog, it sets all its children's translation's so that the return key activates the default button. To change this, you have to set the translation for the return key AFTER creating the text widget. (UIL alone doesn't seem to be able to do it.) Adding the following lines solved the problem for me. (in declarations) char newTrans[] = "Return: newline()"; XtTranslations transTable; (after declarations) transTable = XtParseTranslationTable(newTrans); (after creating but before managing text widget) XtOverrideTranslations(textWidget,transTable); ---------------------------------------------------------------------------- David Rudolph | phone: (508) 870-6914 Data General Corporation | email: daver@paint.dg.com or | daver@fs06.dg.com ----------------------------------------------------------------------------