Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!sun-barr!newstop!sun!argv From: argv@turnpike.Eng.Sun.COM (Dan Heller) Newsgroups: comp.windows.x Subject: Re: Displaying text with XView Message-ID: <137245@sun.Eng.Sun.COM> Date: 14 Jun 90 05:07:36 GMT References: Sender: news@sun.Eng.Sun.COM Distribution: comp Organization: O'Reilly && Associates Lines: 25 In article harry@atmos.washington.edu (Harry Edmon) writes: > I have a application where I would like to display some text generated > by the application in a window with a scrollbar (no editing > necessary). I've tried using the text subwindow in XView, but it has > the nasty property that the text scrolls as it is written into the > window. I would like the top of the text to remain displayed during > insertion of text. Is there any way to do this with an text > subwindow, or does any have a different XView object that will do what > I want? The textsw package is being rewritten, so expect changes in the future... On the other hand, there is -currently- no way to send a bunch of textsw_insert() calls as a "batch" and have the textsw avoid updating and scrolling each time. However, what I have found to be quite reasonable both aesthetically and performance-wise is to write all the data to a tmp file and use TEXTSW_FILE_CONTENTS to have the textsw display the file. No scrolling is done and the text just pops right in. Immediately remove the tmpfile -- this does not affect the display. -- dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.