shockers has asked for the wisdom of the Perl Monks concerning the following question:
#!/bin/env perl -w use Tk; use Tk::Menu; use Encode::Unicode; use strict; my $exit_val = 0; my $menubar; my $menuitems; my $top; my %code = ( 60 => "Contactor Repair | \x{4FEE}\x{593E}\x{8173}", 120 => "Change Cleaning Disk | \x{66F4}\x{63DB}\x{786C}\x{789F}", 180 => "Change Loadboard | \x{66F4}\x{63DB}\x{6E2C}\x{8A66}\x +{677F}", 240 => "Change LN2 | \x{66F4}\x{63DB}\x{6DB2}\x{614B}\x +{6C2E}", ); #----- Main ---------------------------- $top = new MainWindow; $top -> title ("Select"); $top -> geometry ("200x50+10+10"); $menuitems = [ [Cascade => "SELECT", -menuitems => [ [ Button => "$code{ 60}", -font => "courier", -command => [\&exit_ +r, 60] ], [ Button => "$code{120}", -font => "courier", -command => [\&exit_ +r, 120] ], [ Button => "$code{180}", -font => "courier", -command => [\&exit_ +r, 180] ], [ Button => "$code{240}", -font => "courier", -command => [\&exit_ +r, 240] ], ] ], ]; # end menuitems $menubar = $top->Menu (-menuitems => $menuitems); $top->configure(-menu => $menubar); MainLoop; exit ($exit_val); sub exit_r { $exit_val = shift; $top -> destroy; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Chinese font problem in Perl/Tk
by zentara (Cardinal) on Jan 05, 2005 at 13:28 UTC | |
by shockers (Acolyte) on Jan 05, 2005 at 23:51 UTC | |
by Courage (Parson) on Jan 06, 2005 at 13:46 UTC | |
by shockers (Acolyte) on Jan 06, 2005 at 16:32 UTC | |
by Courage (Parson) on Jan 06, 2005 at 21:40 UTC | |
| |
by Courage (Parson) on Jan 07, 2005 at 18:24 UTC | |
| |
by zentara (Cardinal) on Jan 06, 2005 at 12:03 UTC | |
by shockers (Acolyte) on Jan 06, 2005 at 17:39 UTC | |
by zentara (Cardinal) on Jan 06, 2005 at 19:13 UTC |