in reply to Tk::BrowseEntry with Tk::Balloon help
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 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tk::BrowseEntry with Tk::Balloon help
by redlemon (Hermit) on Feb 21, 2005 at 23:33 UTC |