Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!usc!apple!fernwood!synopsys!kennedy From: kennedy@synopsys.com (Sai Kennedy Vedantam) Newsgroups: comp.windows.x.motif Subject: autoscrolling in Text widget - how? Keywords: Motif 1.0.3, Text Widget, Automatic scrolling Message-ID: <590@synopsys.COM> Date: 9 Oct 90 22:39:36 GMT Distribution: usa Organization: Synopsys, Inc. Mountain View, CA USA Lines: 36 Background: Motif 1.0.3, Text widget I recently moved from using Athena widgets to Motif and am currently converting my application to use Motif widget set. I basically need to display dynamic text (among other things) and each time new text is entered from below, the window should automatically scroll so that the last line is visible. It was easy to do using Athena text widget because it was taken care of by the text widget automatically. I can not seem able to do it with the Motif Text widget try as I might! The widget always displays the top n lines and NOT the bottom n lines. Since the text I will be displaying might contain hundreds of lines, I need an efficient solution for this. Now, the question is: >>> Is it a bug? If so, is there a patch/fix available? ( we do have source license for Motif) Note: I searched through the old News archives and found a solution based on using XmShowTextPosition(). To use that, I need to find out what the last n lines are going to be. This task is non trivial considering that long lines are broken automatically into separate lines(XmNwordwrap is True) and I have no easy way of knowing which lines were broken and which were not. I want to use this only as an absolute last resort because of the speed considerations. I am sure others must have come across this problem and I would prefer a fix using some combination of toolkit calls, if possible. Please e-mail me the solution, if this topic has already been beaten to death. Thanks in advance -Sai Vedantam kennedy@synopsys.com ...sun!synopsys!kennedy Ph:415-962-5467