Hello, I'm trying to use the -underline option on a Button in a Tk::NoteBook to implement keyboard mapping. The character appears underlined, but the callback function is not called. Am I missing somthing? (I've tried anonymous callbacks as well).
Code Begin... use Tk; require Tk::NoteBook; sub bail{ exit; }; $mw = MainWindow->new; $mw->title("NoteBook Widget Test"); $f = $mw->NoteBook(); $page1 = $f->add("page1", -label => "page1"); $page1->Button(-text => "Exit", -underline => 0, -command => \&bail )->pack(-side => 'bottom'); $p1_label1 = $page1->Label(-text => "This is page number 1", -highlightbackground => "yellow" )->pack(-side => 'top', -anchor => 'n'); $page1->Button(-text => "Select Page 1", -command => sub { $f->raise("page1"); } )->pack(-side => 'left'); $page1->Button(-text => "Select Page 2", -command => sub { $f->raise("page2"); } )->pack(-side => 'left'); $page1->Button(-text => "Select Page 3", -command => sub { $f->raise("page3"); } )->pack(-side => 'left'); $page1->Button(-text => "Select Page 4", -command => sub { $f->raise("page4"); } )->pack(-side => 'left'); $page2 = $f->add("page2", -label => "page2"); $page3 = $f->add("page3", -label => "page3"); $page4 = $f->add("page4", -label => "page4"); $f->pack(); MainLoop; Code End... Thanks in advance, ========================================================== Powell E. Barber, Sr. Engineer 850.644.6477 voice Department of Nuclear Services 850.644.9848 fax Florida State University Tallahassee FL 32306-4470 [EMAIL PROTECTED] http://nucalf.physics.fsu.edu/~barber ---------------------------------------------------------- "When you've got a Chautauqua in your head, it's extremely hard not to inflict it on innocent people." R. M. Pirsig ========================================================== -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]