Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!deccrl!bloom-beacon!eru!hagbard!sunic!dkuug!modulex!bni From: bni@modulex.dk (Bent Nielsen) Newsgroups: comp.windows.x.motif Subject: Re: -- Traversal & scrolling -- Message-ID: <725@modulex.dk> Date: 28 Mar 91 03:40:18 GMT References: <36.27EF987F@resq.fidonet.org> Organization: A/S MODULEX, Copenhagen, Denmark Lines: 44 Uucp@resq.fidonet.org (Uucp) writes: -- stuff deleted -- >- We have windows with a lot of fields; > Currenlty, if you tab from the last visible field into a scrollable > window, you go to the first visible field . > It is VERY VERY USEFUL according to our customer that we must scroll > the window and put the focus on the "next logical field". > I realize that the application must be involved in some way to resolve > how to scroll to the next field (i.e.: MINIMUN_SCROLLING, CENTERING_FIELD, > SCROLL_TO_ALIGN_LEFT, SCROLL_PAGE, ....,SCROLL_NONE=as_is_now) > I cannot replace all the traversal code (we must work without bug on 1.1.1 > and XmProcessTraversal does not seem to work) but I do not see > an easy way to do this. > What I must do? Fix XmProcessTraversal and work with my motif version, > remove all traversal code and replace with something more "neutral" > (not so rich, but working) or waiting for a Motif version working > with R4 that solve my problems? I had the problem as you describe here and my solution are the following: I change to translation for TAB and Shift-TAB for the widgets in the scrolled window. In these translations I scroll the window by handling the scrollbars and use XmProcessTraversal(widget, XmTRAVERSE_CURRENT) together with XtSetKeyboardFocus(). The reason why I also is using XtSetKeyboardFocus() is that XmProcessTraversal will NOT allways move the focus on a invisible widget (I have read that using XtSetKeyboardFocus in Motif will confuse traversal, but in my case it's working) If you want I can e-mail you some sample code. -- Bent Nielsen A/S MODULEX Phone: +45 44 53 30 11 Lyskaer 15 Telefax: +45 44 53 30 74 DK-2730 Herlev Denmark