in reply to Re: Re: Keyboard traversal for Tk::Notebook
in thread Keyboard traversal for Tk::Notebook

I'm not familiar with Tk::Notebook and so the following may be way off:

I believe you need to run 'bind' outside of the definition of your button. Using the 'underline' option literally only buys you the underlining of the '0'th position ('T') of the label. To actually make it DO something when you press <Alt-Key-T>, wouldn't you do something like the following in a statement outside of the 'my $foo' statement? ($tl is the toplevel widget where your widget lives)

$tl->bind("<Alt-Key-T>", sub { $foo->invoke(); } );