Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!decwrl!infopiz!lupine!jcb From: jcb@NCD.COM (Jim Becker) Newsgroups: comp.windows.open-look Subject: Re: Help modifying textsw scrollbar Message-ID: Date: 21 Jun 91 21:18:13 GMT References: <1991Jun20.210038.5036@pictel.uucp> Lines: 45 harling@pictel.uucp (Dan Harling) writes: I am using the TEXTSW package to display a large array. Rather than print the entire array (which could be several Meg) at once, I print only one screenful of the array at a time. Along with the scrollbar which comes with the TEXTSW package, I create a horizontal scrollbar, so that the view can be manipulated along both axes. Everything is working properly, except for the vertical scrollbar. The display is updated properly, but the elevator on the vertical scrollbar never moves; it always stays at the top of the cable, and the entire cable is highlighted. This is the same position as it would take if it were a normal TEXTSW scrollbar, since the window contains only one screenful of text. I know that my proportioning code is correct, because the horizontal scrollbar moves as expected. I suspect that the text window still has a handle to the vertical scrollbar, and is reproportioning it automatically, but I have been unable to eliminate this. If I destroy the original scrollbar and try to create a new one, no vertical scrollbar appears at all. the vertical scrollbar is _owned_ by the TEXTSW object, and you shouldn't be trying to set it. you can't subvert it, as it knows how many lines are in the TEXTSW content and sets the scrollbar to reflect this. it's not under your domain to change. I have talked to Sun about this, and all they have been able to suggest (so far) is that I not use the TEXTSW package, or perhaps look for some useful X calls. If you have any suggestions, or if you are encountering similar problems yourself, please drop me a line. sounds like you want to use a CANVAS, and do your own attached scrollbars to it. the TEXTSW object is composite, with the text area and the scrollbar, so you have to either use the entire thing or nothing. -Jim -- -- -Jim Becker / jcb@ncd.com / Network Computing Devices, Inc. (NCD)