harry@atmos.washington.edu (Harry Edmon) (06/14/90)
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? -- Harry Edmon INTERNET: harry@atmos.washington.edu (206) 543-0547 UUCP: uw-beaver!atmos.washington.edu!harry Dept of Atmospheric Sciences, AK-40 University of Washington
argv@turnpike.Eng.Sun.COM (Dan Heller) (06/14/90)
In article <HARRY.90Jun13155804@stormy.atmos.washington.edu> 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.