slc1290@HARE.UDEV.CDC.COM (steve chesney x4662) (07/31/90)
----- Unsent message follows ----- Received: by hare.udev.cdc.com (5.61/1.34) id AA15888; Thu, 26 Jul 90 17:20:21 -0500 Date: Thu, 26 Jul 90 17:20:21 -0500 From: slc1290 (steve chesney x4662) Message-Id: <9007262220.AA15888@hare.udev.cdc.com> To: windows.x.motif@comp I have an application that resembles a "fill in the blank" form so common to old style dumb terminal interfaces. It consists of a XmBulletinBoard widget with many XmText widgets for user input. Each text widget is a tab group. My question: How can I control which XmText receives the keyboard focus (i.e., contains the tab cursor and will receive keyboard events). It seems that the focus initially belongs to the first XmText added to the list of tab groups. I have tried XtSetKeyboard focus; while it highlights the intended XmText, the first text widget in the list also has a highlight, and it gets all keyboard events. I even see two blinking I-beam cursors! My only other idea, when desiring to move the tab cursor, is to remove all text widgets from the tabgroup list, and the re-add them starting with the text widget that I want to get keyboard focus. There must be a better way!
ejp@bohra.cpg.oz (Esmond Pitt) (08/01/90)
In article <9007301755.AA29376@hare.udev.cdc.com> slc1290@HARE.UDEV.CDC.COM (steve chesney x4662) writes: > How can I control which XmText receives the keyboard focus (i.e., > contains the tab cursor and will receive keyboard events). It seems > that the focus initially belongs to the first XmText added to the > list of tab groups. > > I have tried XtSetKeyboard focus; while it highlights the intended XmText, > the first text widget in the list also has a highlight, and it gets all > keyboard events. I even see two blinking I-beam cursors! This is a known problem. Solution: Motif 1.0*: use _XmGrabTheFocus(widget): undocumented but effective. Motif 1.1: use XmProcessTraversal(...) (details unknown to me). -- Esmond Pitt, Computer Power Group ejp@bohra.cpg.oz D