Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Tk text scrollbar autohide

by Anonymous Monk
on Feb 11, 2020 at 15:54 UTC ( #11112777=perlquestion: print w/replies, xml ) Need Help??

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 (Prior) 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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11112777]
Approved by LanX
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2020-08-09 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (55 votes). Check out past polls.

    Notices?