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

Re^2: Perl Tk Scrolled widget callbacks

by ghosh123 (Monk)
on Mar 01, 2013 at 13:00 UTC ( #1021248=note: print w/replies, xml ) Need Help??

in reply to Re: Perl Tk Scrolled widget callbacks
in thread Perl Tk Scrolled widget callbacks

My problem is that, I have to find a solution with this Scrolled text area only. This custom "popup do the work" is wonderful but I have to fit it into my code which is using Scrolled widget. Changing the 'Scrolled' thing is not an option for me

  • Comment on Re^2: Perl Tk Scrolled widget callbacks

Replies are listed 'Best First'.
Re^3: Perl Tk Scrolled widget callbacks
by zentara (Archbishop) on Mar 01, 2013 at 17:39 UTC
    The example I gave above works with a Scrolled Text widget as well. Just change the line
    my $txt = $mw->Text()->pack(-side => 'top'); #to my $txt = $mw->Scrolled('Text')->pack(-side => 'top');
    Another option is to bind mouse button 3 ( right click ) to the $mw to do your change. Supressing the Text menu is up to you.
    #!/usr/bin/perl use Tk; my $mw = MainWindow->new; my $txt = $mw->Scrolled('Text')->pack(-side => 'top'); $mw->bind('<Button-3>', sub { print "main control 3 \n" }); MainLoop;

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021248]
[Eily]: Hi!
[Happy-the-monk]: Discipulus: si!
[Eily]: Discipulus 2018 has to be better than 2017. The latter was kinda odd, but not we got even :D
[Corion]: Eily++ # basic number theory

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2018-01-23 08:54 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (242 votes). Check out past polls.