logo       

Re: pTk Scrolled Text problem: msg#00045

Subject: Re: pTk Scrolled Text problem
I've dealt with this problem myself while outputing various lines of data to my text widget. I seem to have resolved the "jumpy" scrollbar by issing a $mainwindow->update at the end of a stream of inserts (however many that may be). I also use $output->see end after that update as well, but that may not be an option for you depending how you want to present your data. The only "quirk" im seeing right now is sometimes the actual scroll bar doesn't appear untill you mouse over the area where it is supposed to be. Its a fair tradeoff for now, but I'm not assuming that thats the last I'll
see of the "jumpy" optional scrollbars.

Konovalov, Vadim wrote:

Here is a script that will show the problem...  When it starts up it
will consume 100% cpu due to the scrollbar attempting to redraw...
Watch the thumb bounce up and down in the scroll region.

this problem is in perl/Tk and does not appear to be in Tcl/Tk.
Because if I replace many "use Tk; use Tk::something" with single

 use Tcl::Tk qw(:perlTk);

, the problem does not appear.

As a side note, following lines in that script are inessential but
incorrect:

# subroutine declarations, needed by strict setting
use subs qw( CreateMainUI );

removing those do not influence breakage

Vadim


Thanks again for any help...

On Tue, 2005-12-13 at 17:46 +0000, t.littlefield@xxxxxxxxxxx wrote:
Hello,

I've been struggling with a problem with the perl/Tk Text widget for
a while now. We create a scrolled text widget that has the
scrollbars
as optional (osoe). If the contents of the widget extend
vertically past the
border of the widget, there is no problem. The scrollbar
appears and
functions correctly.

If on the other hand, it extends past the borders
vertically and in some
spots horizontally, then as it scrolls the x-scrollbar
appears and disappears
as it is needed.  No problem here either.

The problem seems to be when the first line above or below
the currently
viewed text is wider than the visible region, the hide/show
scrollbar code
seems to cause an oscillation... i.e. the horizontal
scrollbar keeps appearing
and disappearing. This continues until the app is
killed...  This happens
when scrolling or selecting text.

A similar problem to what is going on is easy to reproduce.
Create a text
widget and add some text. Have one line off screen that
needs the horizontal
scrollbar. Have just enough lines after it so that it will
be just off the screen
if you scroll all the way down.

Now scroll all the way down. Notice that it keeps jumping
up and down as
you try to view the last lines.... The problem goes away
if you make the window
wide enough to not need the x-scrollbar...

(I'll put together a sample if need be...)

This has happened on RedHat 9 Linux with the latest Tk code
as well as with
ActiveState perl and the Tk it is shipped with...

Any ideas?
Thanks in advance...

- Todd
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@xxxxxxxxxxxxxxxxxx
--

                                                       - Todd

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@xxxxxxxxxxxxxxxxxx


-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@xxxxxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe