logo       

Scrollbar misbehaving w/ ROText ?: msg#00016

Subject: Scrollbar misbehaving w/ ROText ?
I have an app with a Scrolled ROText. The ROText is a
Console type window for an IDE, so new lines are always
being added at the bottom. It only has an vertical scrollbar
(BTW, this is WinXP, pTK 804.027 + patches, AS 5.8.3).

When the ROText starts filling up, and I scroll up to see
whats happened, then attempt to scroll back down by clicking
below the slider (or even dragging the slider directly),
occasionally the slider (and text) goes in the
wrong direction, or won't move at all. It only seems to happen
when the slider is near the bottom, and a signifcant amount of
text has been added. Is this a known problem, and, if so,
is there a patch I've overlooked ? (I didn't get any
google hits describing this specific behavior). Here's sample code that
exihbits this behavior; you'll need to scroll to the bottom,
then try dragging the slider up to scroll back, and/or
try to click below the slider (it takes a few tries before
it gets confused):

use Tk;
use Tk::ROText;

use strict;
my $page;

my $mw = MainWindow->new;

my $textfont = { -family => 'Courier',
                -size => 10,
                -weight => 'normal',
                -slant => 'roman' };

my $labelfont = { -family => 'Arial',
                -size => 10,
                -weight => 'bold',
                -slant => 'roman' };

$mw->fontCreate('_textfont', %$textfont);
$mw->fontCreate('_labelfont', %$labelfont);

$mw->DefineBitmap('bgstipple' => 8, 2,
                pack('b8' x 2, '1.1.1.1.', '.1.1.1.1'));

$page = $mw->Scrolled('ROText',
                -scrollbars => 'e',
                -height => 15,
                -width => 40,
                -font => '_textfont',
                -wrap => 'char',
                -background => 'white',
                -selectbackground => 'blue'
                )
                ->pack(-side => 'left', -expand => 0, -fill => 'both');

        $page->tagConfigure('sel', -bgstipple => 'bgstipple');
        $page->tagConfigure('errtext', -foreground => '#fff020000000',
                -font => '_labelfont');
        $page->tagConfigure('infotext', -foreground => '#20000000fff0',
                -font => '_labelfont');
        $page->tagConfigure('resulttext', -foreground => 'black',
                -font => '_textfont');
        $page->tagConfigure('warntext', -foreground => 'gray30',
                -font => '_labelfont');
        $page->tagConfigure('findtext', -background => 'green',
                -foreground => 'blue', -bgstipple => 'bgstipple');
#
#       extend the popup menu
#
        my $qtpopup = $page->menu;
#
#       borrow the edit and search menu callbacks for our edit menubar
#       Will this cause problems when we discard <base> window ?
#
        my $qteditpopup = $qtpopup->entrycget('Edit', -menu);
        my $qtviewpopup = $qtpopup->entrycget('View', -menu);
#
# don't let them do dangerous stuff here...
#
        $qtpopup->delete('File');
        $qtpopup->delete('Search');

#
#       add a bunch of lines
#
$page->insert('end',
 "asdga qergw thwfr wwtrhefgghdfgj wetjdfgh eghgsdsgh\n")
        foreach (1..900);

        $mw->MainLoop;



Also, I've noticed the problem described in
http://groups-beta.google.com/group/comp.lang.perl.tk/browse_thread/thread/8bb344e28db863fc/cc6ae8023688bd7e?q=scroll+slider+bug+group:comp.lang.perl.tk&rnum=1&hl=en#cc6ae8023688bd7e
still seems to exist ? I have some popup windows with help text
(using vertically scrolled ROTexts) that sometimes have embedded
images, and the scrollbar size does change depending on the
current location in the text. Is there a fix/workaround in 804.027
yet ?

Thanks,
Dean Arnold
Presicient Corp.
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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