Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: TK Scrollbars not working correctly

by pg (Canon)
on Jan 22, 2003 at 07:39 UTC ( [id://228962]=note: print w/replies, xml ) Need Help??


in reply to TK Scrollbars not working correctly

If you want both horizontal and vertical scrollbars, you have to say: -scollbars es, not -scrollbars e -scrollbars s

Those named parameters are indeed hash elements, to reassign them, simply overwrites the existing value.

One example:

use Tk; use strict; use warnings; sub something { my $box = shift; $box->delete("1.0", "end"); $box->insert("end", $_) for (1 .. 100); } my $mw = MainWindow->new(title=>"Scrollbar Demo"); my $box = $mw->Scrolled(qw/Text -width 100 -height 15 -scrollbars se/) +->pack; $mw->Button(text=>"click", command=>[\&something, $box])->pack; MainLoop;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://228962]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-19 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found