Detecting mouse button up after resizing window
- From: Wes Barris <noway@xxxxxxxxx>
- Date: Sat, 20 Aug 2005 23:19:31 GMT
Hi,
I would like to have a "resize" callback that is only executed once at the end of a resize event (ie, when the mouse button is released after dragging a corner of the main window). The code below works, but I get resize events continuously while the window is being resized. Is there a way to capture a ButtonRelease event at the end of a resize? I've tried binding to ButtonRelease events but they do not appear to be captured while the mouse pointer is on the border of a window. I guess the window manager is capturing those events.
#!/usr/bin/perl -w
use strict;
use Tk;
my $main = new MainWindow;
my $image = $main->Photo();
my $label = $main->Label(-image=>$image, -width=>100, -height=>100)->pack(-expand=>1, -fill=>'both');
$label->bind('<Configure>', \&displayImage);
MainLoop;
sub displayImage {
print("resize\n");
return;
}
.- Follow-Ups:
- Re: Detecting mouse button up after resizing window
- From: zentara
- Re: Detecting mouse button up after resizing window
- Prev by Date: Re: Keep getting error message! What does it mean?
- Next by Date: Newbie Q: Does anybody have a simple calculator program?
- Previous by thread: Keep getting error message! What does it mean?
- Next by thread: Re: Detecting mouse button up after resizing window
- Index(es):