Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!rice!uupsi!sunic!news.funet.fi!funic!santra!santra!f28982j From: f28982j@kaira.hut.fi (Karl R J Holmstrom) Newsgroups: comp.windows.x.motif Subject: Strange TextWidget focus behaviour Message-ID: Date: 7 Nov 90 19:15:35 GMT Sender: news@santra.uucp (Cnews - USENET news system) Reply-To: Karl Holmstrom Organization: Helsinki University of Technology, Finland Lines: 23 This has probably been asked before, but could somebody please help me. I have difficulties in getting a TextWidget to give up focus. I have one single line TextWidget in a FormWidget along with a few PushButtonWidgets and a DrawingArea. I would like the TextWidget to behave like this: When I click on the TextWidget, it should get keyboard focus. When I press return or click on the surrounding form, the TextWidget should lose focus so that I can update the application with the new string. The TextWidget gets the focus but I can't figure out how to loose focus. I've tried to add a translation to the surrounding FormWidget that calls _XmGrabTheFocus or XSetInputFocus after a button press. However, nothing seems to affect the TextWidget focus. When it has once obtained focus there seems to be no way to give up focus! I'm using Motif 1.0.X on HP-UX 7.0. Karl