Arun ragini wrote:
i have been trying to work with MouseOver on textfield, but it does'nt
seems to work, what im trying to do is, print a msg in the status bar
(tool tips).
if possible can some post the code to do that.
Here's a cut-down version of the code from
http://perl-win32-gui.sourceforge.net/cgi-bin/wiki.cgi?Vanishing_Titlebar
Hope it helps.
Rob.
#!perl -w
use strict;
use warnings;
use Win32::GUI qw(TME_HOVER TME_LEAVE);
my $mw = Win32::GUI::Window->new(
-title => "Hover & Out Events",
-pos => [100,100],
-size => [400,300],
-onMouseOver => sub {print "Hover\n"; return;},
-onMouseOut => \&Out,
-onMouseMove => \&Move,
);
$mw->UserData(0); # Store 0 for In, 1 for Out
$mw->Show();
Win32::GUI::Dialog();
exit(0);
sub Out
{
my ($self) = @_;
print "Out\n";
$self->UserData(0);
return;
}
sub Move
{
my ($self) = @_;
return unless $self->UserData() == 0;
print "In\n";
$self->UserData(1);
$self->TrackMouse(1000,TME_HOVER|TME_LEAVE);
return;
}
__END__