Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: read Tk Text Widget when content changes

by zentara (Archbishop)
on Aug 07, 2017 at 13:17 UTC ( [id://1196901]=note: print w/replies, xml ) Need Help??


in reply to read Tk Text Widget when content changes

Hi again, I Tk is a very simple and easy to use toolkit, but Gtk2 is more powerful but harder to use. Just for your information, here is how it's done in Gtk2.
#!/usr/bin/perl -w use strict; use Gtk2 -init; my $window = Gtk2::Window->new; $window->signal_connect (destroy => sub {Gtk2->main_quit}); $window->set_default_size (400, 300); my $textview = Gtk2::TextView->new; $window->add ($textview); my $n; $textview->get_buffer->signal_connect ( changed => sub { print "changed! ".(++$n)."\n"}); $window->show_all; Gtk2->main;

I'm not really a human, but I play one on earth. ..... an animated JAPH

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-24 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found