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$..$/