From: Arun r. <aru...@gm...> - 2006-11-09 06:52:44
|
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. thanks arun -- ----- Fight back spam! Download the Blue Frog. http://www.bluesecurity.com/register/s?user=YXJ1bnJhZ2luaQ%3D%3D |
From: Kind, U. (AGIS) <uwe...@al...> - 2006-11-09 11:04:51
|
Hi Arun, I did it that way: ------------------------------------------------------------------------ -- use Win32::GUI (); my $mw; $mw =3D new Win32::GUI::Window ( -name =3D> 'main_window', -text =3D> 'main_window', -left =3D> 100, -top =3D> 100, -width =3D> 300, -height =3D> 200, -onMouseMove =3D> sub { $mw -> { 'statusbar' } -> Text ( '' ); } ); $mw -> AddTextfield ( -name =3D> 'textfield1', -left =3D> 0, -top =3D> 0, -width =3D> $mw -> ScaleWidth (), -height =3D> $mw -> ScaleHeight () / 4, -onMouseMove =3D> sub { $mw -> { 'statusbar' } -> Text ( 'Test 01' ); } ); $mw -> AddTextfield ( -name =3D> 'textfield2', -left =3D> 0, -top =3D> $mw -> ScaleHeight () / 4 + 10, -width =3D> $mw -> ScaleWidth (), -height =3D> $mw -> ScaleHeight () / 4, -onMouseMove =3D> sub { $mw -> { 'statusbar' } -> Text ( 'Test 02' ); } ); $mw -> AddStatusBar ( -name =3D> 'statusbar', ); $mw -> Show (); Win32::GUI::Dialog (); ------------------------------------------------------------------------ -- Bye Uwe Von: per...@li... [mailto:per...@li...] Im Auftrag von Arun ragini Gesendet: Donnerstag, 9. November 2006 07:53 An: per...@li... Betreff: [perl-win32-gui-users] MouseOver 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. thanks=20 arun --=20 ----- Fight back spam! Download the Blue Frog. http://www.bluesecurity.com/register/s?user=3DYXJ1bnJhZ2luaQ%3D%3D <http://www.bluesecurity.com/register/s?user=3DYXJ1bnJhZ2luaQ%3D%3D>=20 |
From: Robert M. <rm...@po...> - 2006-11-09 20:09:18
|
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 |
From: Robert M. <rm...@po...> - 2006-11-09 20:10:40
|
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__ |