[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] justifying command key equivalent hints in menus



How does one justify command key equivalent hints in MacPerl menus so that
the command key symbols line up?  A sample script is below.

TIA,
David Seay
http://www.mastercall.com/g-s

-------------------

#!perl

use Mac::Menus;
use Mac::Events;

@options=split(/,/,"Ordinal,First\t\t\t1,Second\t2,Third\t\t\t3,Fourth\t\t4"
);
$m="\$menu = new MacMenu 2048, \"$options[0]\", \(\n";
for ($z = 1;$z < @options;$z++) { $m .= "    \[\"$options[$z]\"\,
\\&Handler\]\,\n" }
eval "$m\)";

$menu->insert;
WaitNextEvent until defined $Menu;

dispose $menu;

sub Handler {
	my($menu,$item) = @_;
	$choice = substr($options[$item],0,index($options[$item],"\t"));
	print "You selected \"$choice\" from the \"$options[0]\" menu.\n";
	$Menu = $item;
}



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch