Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Do you know where your variables are?
 
PerlMonks  

Re: Using scrollbar in combination with Text and pack function

by juo (Curate)
on May 27, 2002 at 08:32 UTC ( [id://169559]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Using scrollbar in combination with Text and pack function

I have found how to do it. It's just a little bit more of code. The scrollbars have to get linked to the text widget and wrap mode should be set to none.

#!/perl/bin/perl use Tk; # sel_report(); # ###################### Main Graphical GUI activation sub sel_report{ my $mw = MainWindow->new; $mw->title("GRAPHICAL COMPARE"); $wjob = $mw->Frame()->pack(-side => 'top', expand => 1, -fill => ' +both'); $scrollbarver = $wjob->Scrollbar()->pack(-side => 'left', -fill => + 'both'); $scrollbarhor = $wjob->Scrollbar(-orient => 'horizontal')->pack(-s +ide => 'bottom', -fill => 'both'); $testo=$wjob->Text( -borderwidth =>2, -relief => 'solid', -height +=> 40, -width => 100 , -wrap => 'none' , -yscrollcommand => ['set' => + $scrollbarver], -xscrollcommand => ['set' => $scrollbarhor]); #$testo=>Scrolled("Text", - scrollbars => 'se')->pack(); $scrollbarver->configure(-command => ['yview' , $testo]); $scrollbarhor->configure(-command => ['xview' , $testo]); $scrollbarver->pack(-side => 'right', -fill => 'y'); $scrollbarhor->pack(-side => 'bottom', -fill => 'x'); $testo->pack(-side => 'bottom', fill => 'both', -expand =>1); $testo->insert('end', Page 1 Compare results ( UNIT ARE IN MM ) X Position Y Position JOB Name Step1 Step2 + Ref.Layer ====================================================================== +================================== -57.4763925 33.9636075 demosmall novpl vpl + results_layer_top -52.3963925 33.9636075 demosmall novpl vpl + results_layer_top -6.6763925 44.1236075 demosmall novpl vpl + results_layer_top 18.22361 8.06361 demosmall novpl vpl + results_signal_2 18.22361 13.14361 demosmall novpl vpl + results_signal_2 23.30361 13.14361 demosmall novpl vpl + results_signal_2 53.78361 23.30361 demosmall novpl vpl + results_signal_2 53.78361 28.38361 demosmall novpl vpl + results_signal_2 ); MainLoop; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://169559]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.