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

Tk text scrollbar autohide

by Anonymous Monk
on Feb 11, 2020 at 15:54 UTC ( [id://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 (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;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found