Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl/Tk Optional Vertical Scrollbar Bugfix

by lamprecht (Friar)
on Oct 25, 2010 at 11:57 UTC ( #867200=note: print w/replies, xml ) Need Help??


in reply to Perl/Tk Optional Vertical Scrollbar Bugfix

Hi,

the bug you describe seems to appear on windows only. It can be boiled down to the following example.
Also this workaround is a bit more 'general-purpose' as it does not require the widget to be managed by the 'pack' geometry manager:

use strict; use warnings; use Tk; use Tk::Text; my $mw = tkinit; my $t = $mw->Scrolled('Text', -scrollbars => 'osoe', )->pack; $t->update; $t->insert("insert", sprintf "%3d. Text Text Text\n",$_) for(0..64); $t->update; # force scrollbar refresh: # my $sb = $t->Subwidget('yscrollbar'); # $sb->set( $sb->get ); MainLoop;
Cheers, Christoph

Replies are listed 'Best First'.
Re^2: Perl/Tk Optional Vertical Scrollbar Bugfix
by liverpole (Monsignor) on Oct 25, 2010 at 12:06 UTC
        seems to appear on windows only

    Yes, I did mention that in the original post.  

    And I should have said that my solution (fairly obviously) only works for the pack geometry manager.

    But your fix is much better; it's elegant *and* simple ... way ++cool.


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://867200]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2021-12-05 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (31 votes). Check out past polls.

    Notices?