sub PopupLookup{ my ($mw, $obj) = @_; print "Building popup\n"; my @items('black', 'yellow', 'red'); my $Content11='states'; my $Content12='city'; my $menu = $mw->Menu(-tearoff=>0, -menuitems=>[ [command=>'Show Menu', -command=>[sub {DialogSettings()}, $obj,]], [ checkbutton => "Show column 1", -variable => \$Content11, -onvalue => '11', -offvalue => '0', -compound => 'left', -command => [ sub { SetView(1) }, $obj ] ], [ checkbutton => "Show column 2", -variable => \$ContentC12, -onvalue => '12', -offvalue => '0', -compound => 'left', -command => [ sub { SetView(2) }, $obj ] ], map ( [radiobutton => " Search in $DBColumn{$_}", -variable => \$DBColumn, -command => sub {print "Setting $_\n"}, -value => $_, ], @items ), [ radiobutton => " Search all languages", -variable => \$DBColumnTo, -value => '0', -command => [ sub { print "Setting search in all\n" }, $obj ] ], ]); $obj->menu($menu); $obj->bind('', ['PostPopupMenu', Ev('X'), Ev('Y'), ]); return $obj; }