http://qs1969.pair.com?node_id=906918

ZJ.Mike.2009 has asked for the wisdom of the Perl Monks concerning the following question:

For example, in the following code:
use strict; use warnings; use Wx; package MyApp; use base 'Wx::App'; sub OnInit { my $frame = Wx::Frame->new( undef, -1, 'A Clickable Label', ); my $label = Wx::StaticText->new( $frame, -1, "Click here to exit", ); $frame->Show; } MyApp->new->MainLoop;
How can I make the static text respond to a mouse event like a button does so that I can click $lable to exit? Thanks for any help.