Any idea ?
a code snippet =>
sub menuOptions {
my $dl = $mw->Dialog(
-title=>'Options',
-buttons=> [qw/Ok Cancel/],
);
my $fr = $dl->Frame(-class => 'options' );
$fr->Label(-text=>'Couleur Ch Noir') ->grid(
$fr->Entry(-textvariable=>\$CH_BLACK),
$fr->Button(-text=>'...',-command=> sub {
my $color1 = $fr->chooseColor(
-initialcolor=>$CH_BLACK,
-title=>'Selectionnez la couleur du ch NOIR');
$CH_BLACK=$color1 if defined $color1;
})
);
../..
$fr->pack;
my $ans = $dl->Show;
if( $ans eq 'Ok' ) {
doSomeUpdate(); #etc..
}
}
--
Johnny "gandalf" Brasseur (http://www.perlone.org)
All i have to do is this :
$dl->grabRelease();
# before
> my $color1 = $fr->chooseColor(
#and
$dl->grabCurrent();
# after
in order to release keyboard and mouse grabing and refocus it back to the
calling dialog window. So simple.
I tested it, it works !
see ya