Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!ucbvax!ISI.COM!tsang From: tsang@ISI.COM (Kam C. Tsang) Newsgroups: comp.windows.x.motif Subject: (none) Message-ID: <9104300136.AA11631@phecda> Date: 30 Apr 91 01:36:11 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 25 Subject: problems auto-displaying last line in XmScrolledText > I am using XmCreateScrolledText to create a scrolling text widget. > However, the slider is stuck at the top of the scrollbar. I can move > it with the mouse, but I cannot move it programmatically. What I would > like to do is add text at the end and have the last line of the added > text always visible. Setting the XmNautoShowCursorPosition to True > should do the trick, but does not. After you insert the string, use XmTextGetLastPosition to figure the last position of your text widget, and then use XmTextShowPosition to make the last line of the added text visible. The prototypes of the above two calls are: XmTextPosition XmTextGetLastPosition(Widget); void XmTextSetTopCharacter(Widget, XmTextPosition); Hope it helps. -kam +---------------------------------------------------------------------+ | Kam Tsang (tsang@isi.com) Integrated Systems, Inc. | | User-Interface Group 3620 Jay Street | | (408) 980-1590 x275 Santa Clara, CA 95054 | +---------------------------------------------------------------------+