in reply to Re: Inactive Scroll Bar - Scrolled Listbox
in thread Inactive Scroll Bar - Scrolled Listbox

The code you posted works fine. What part is of my code would you like to see? It's a very large script so I tried to pull the parts related to the scroll bar.

  • Comment on Re^2: Inactive Scroll Bar - Scrolled Listbox

Replies are listed 'Best First'.
Re^3: Inactive Scroll Bar - Scrolled Listbox
by lamprecht (Friar) on Apr 12, 2011 at 16:56 UTC

    Here is a complete runnable example, that demonstrates the problem:

    use strict; use warnings; use Tk; my $mw = tkinit; my $frm1 = $mw -> Frame(-bg=>'LightSkyBlue1') -> pack(-fill => 'x'); my $frm11 = $frm1 -> Frame(-bg=>'LightSkyBlue1') -> pack(-fill => 'x') +; my $lst = $frm11 -> Scrolled('Listbox', -width => 50, -height => 5, -scrollbars => 'oe', -selectmode => 'single') -> pack(); $mw->update; $lst -> delete ('0.0', 'end'); $lst -> insert('end',(0..10)); $mw->update; # force scrollbar refresh: # my $sb = $lst->Subwidget('yscrollbar'); # $sb->set( $sb->get ); MainLoop;
    See also:
    Re: Perl/Tk Optional Vertical Scrollbar Bugfix

    Cheers, Christoph
      That works! Thank you!