in reply to Popup Menus on Tk::Notebook tabs
here is a short example (check Tk::bind for valid Event symbols/characters):
use warnings; use strict; use Tk; my $mw = tkinit; my $n = $mw->NoteBook()->pack; for(qw/foo bar baz/){$n->add($_, -label => $_, );} $n->bind('<3>',[\&process_bt3,Ev('x'),Ev('y')]); MainLoop; sub process_bt3{ my ($w, $x, $y) = @_; my $selected = $w->identify($x,$y); print "selected Tab: $selected\n" if( $selected ); }
update: link for bind doc
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Popup Menus on Tk::Notebook tabs
by skewray (Initiate) on Sep 22, 2009 at 00:56 UTC |