john@lintilla.dle.dg.com (John Farrell) (09/17/90)
Can someone tell me how I can explicitly set the input focus to a particular widget from within my application? I have a screen consisting of lots of XmText widgets within a Form. In one of the Text widgets, I process the input in the Activate callback, and if the input was empty I want to move the input focus/cursor to the next Text widget (yes, I know it's a bit weird). Browing the man pages I thought that XtCallAcceptFocus() looked just the thing, but when I tried to use it I discover it does not actually exist in my libXt. Any ideas? John M. Farrell | john@dle.dg.com Data General | Development Lab Europe | /C=gb/ADMD=gold 400/PRMD=dgc/O=dle/SN=Farrell/GN=John Cambridge, England |
gabe@hpcvlx.cv.hp.com (Gabe Begeddov) (09/22/90)
/ hpcvlx:comp.windows.x.motif / john@lintilla.dle.dg.com (John Farrell) / 6:24 am Sep 17, 1990 / Can someone tell me how I can explicitly set the input focus to a particular widget from within my application? In 1.1 you should call XmProcessTraversal(target , XmTRAVERSE_CURRENT). In 1.0 you can use the undocumented _XmGrabTheFocus(target). Do not use the Xt interfaces directly since you will bypass the motif traversal layer and cause it to get confused.