I'm somewhat new to Tk, so hopefully someone can shed some light on this for me.
Whenever I use the Tk::Balloon widget the MainWindow is not active when the my app starts up.
Clicking on the window makes it active, and everything works fine.
The main problem I'm having is when you mouseover the ballooned widget when the window isn't active.
When you move the mouse off the widget the balloon disappears and the window that called the app (usually the command prompt) becomes active, effectively hiding the application window.
The following sample code illustrates the issue:
###############################
use Tk;
use Tk::Balloon;
my $main = MainWindow->new();
my $frame = $main->Frame();
my $hellobutton = $frame->Button(-text => "Hello")->grid();
$frame->pack();
# uncomment following lines and MainWindow no longer has focus when app is run
#my $balloon = $frame->Balloon();
#$balloon->attach(
# $hellobutton,
# -balloonposition => "mouse",
# -balloonmsg => "This is a test"
#);
MainLoop;
##############################
Anyone have any idea how I can fix this?
Is there other tooltip widgit that is available?
BTW, this is on a windows platform.
Thanks.
Whenever I use the Tk::Balloon widget the MainWindow is not active when the my app starts up.
Clicking on the window makes it active, and everything works fine.
The main problem I'm having is when you mouseover the ballooned widget when the window isn't active.
When you move the mouse off the widget the balloon disappears and the window that called the app (usually the command prompt) becomes active, effectively hiding the application window.
The following sample code illustrates the issue:
###############################
use Tk;
use Tk::Balloon;
my $main = MainWindow->new();
my $frame = $main->Frame();
my $hellobutton = $frame->Button(-text => "Hello")->grid();
$frame->pack();
# uncomment following lines and MainWindow no longer has focus when app is run
#my $balloon = $frame->Balloon();
#$balloon->attach(
# $hellobutton,
# -balloonposition => "mouse",
# -balloonmsg => "This is a test"
#);
MainLoop;
##############################
Anyone have any idea how I can fix this?
Is there other tooltip widgit that is available?
BTW, this is on a windows platform.
Thanks.