in reply to Tk::BrowseEntry with Tk::Balloon help

I diddled with it for awhile before doing a groups.google search for "browseentry and balloon helpmsg"

Jack D. figured it out, and you can google yourself for the full discussion, but the gist of it is that BrowseEntry does a GrabGlobal command which mucks things up. Try this:

#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Balloon; use Tk::BrowseEntry; # by Jack D. of comp.lang.perl.tk my $main = MainWindow->new; my $be = $main->BrowseEntry(-listcmd=>\&releaseGrab)->pack; $be->insert("end", "opt1", "opt2", "opt3"); my $sl = $be->Subwidget('slistbox'); my $l = $sl->Subwidget('scrolled'); my $b = $main->Balloon(); $b->attach($l, -balloonposition => 'mouse', -msg => ['first entry', 'second entry','third entry'] ); MainLoop(); sub releaseGrab{ $main->after(350,sub{$be->grabRelease}); # 350 ms is the init delay in the balloon # a smaller number will still likely work }

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: Tk::BrowseEntry with Tk::Balloon help
by redlemon (Hermit) on Feb 21, 2005 at 23:33 UTC

    Zentara, I bow to your wisdom and give you ++. That just solved it. Thanks.