Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!apple!portal!cup.portal.com!Link_-_APO From: Link_-_APO@cup.portal.com Newsgroups: comp.windows.x.motif Subject: Re: Setting keyboard focus Message-ID: <39956@cup.portal.com> Date: 8 Mar 91 19:40:36 GMT References: <1991Mar7.124545@MAX7.llnl.gov> Organization: The Portal System (TM) Lines: 29 >Here's the poop - >I've got a few XmText widgets sitting in an XmForm. My basic goal >is to re-write the tab grouping mechanism so that I can do my >own validation before moving onto another XmText widget. (i.e. when >I press Tab, I want to check the contents of the XmText, if it's >ok then I'll move on; otherwise I stay where I am and do some sort >of error handling). >Currently, I'm using XtSetKeyboardFocus(), but I wind up with TWO text fields >with cursors. I guess one of my problems is that I can't force one >of the widgets to "give up" input focus. >Any hints out there? Thanks much! >rich mayfield Hi Rich, You didn't say what your arguments were to XtSetKeyboardFocus(). Try using something like: XtSetKeyboardFocus( root_widget, text_widget ) ; or XtSetKeyboardFocus( form_widget, text_widget ) ; Good Luck! ---------------------------------------------------------------- Sandy Johan link_apo@cup.portal.com(Sandy) sun!portal!cup.protal.com!link_apo