http://qs321.pair.com?node_id=11112777

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am learning Tk. I want that the text widget displays the vertical scrollbar only if this is needed, otherwise it should hide. This is normal practice today. In the Widget POD I could not find any reference to this feature, so I guess it does not exist. Has anybody been able to achieve this? On the Internet I only found a Python code, but I do not speak Python. Any suggestion?

Replies are listed 'Best First'.
Re: Tk text scrollbar autohide
by tybalt89 (Monsignor) on Feb 11, 2020 at 16:41 UTC
    #!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11112777 use warnings; use Tk; my $mw = MainWindow->new; my $text = $mw->Scrolled(Text => -scrollbars => 'osoe', )->pack; MainLoop;