in reply to Tk Buttons look
#!/usr/bin/perl # http://perlmonks.org/?node_id=1166034 use strict; use warnings; use Tk; my $mw = new MainWindow( -takefocus => 1 ); $mw->geometry( "300x300" ); my $label = $mw -> Label(-text=>"Hello World", -takefocus => 0 ) -> pack(); my $buttonframe = $mw->Frame( -relief => 'sunken', -padx => 2, -pady => 2, -takefocus => 0, -bd => 1, )->pack(); my $button = $buttonframe -> Button(-text => "Show", -padx => 10, -pady => 6, -takefocus => 1, -command => sub { showmessage(); }) -> pack(); $button->focus; MainLoop; sub showmessage{ $mw->messageBox (-message=>"The glossary has been merged", -icon=> ' +info', -type => 'YesNoCancel'); }
Note that the sunken frame is put around the default button in the messageBox, the other buttons are just plain buttons.
|
|---|