Thread MainWindow Events (3 answers)
Opened by Gast at 2008-03-07 12:07

renee
 2008-03-07 12:29
#106783 #106783
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Also das "Resize" könnte man so machen:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl

use strict;
use warnings;
use Tk;


my ($width,$height) = (300,400);
my $mw = tkinit;
$mw->geometry( $width . 'x' . $height );
$mw->bind('<Configure>', \&resize_mw);


MainLoop;

sub resize_mw{
   my $ev = $mw->XEvent;
   if( $width != $ev->w or $height != $ev->h ){
      $width  = $ev->w;
      $height = $ev->h;
      print "Fenstergroesse veraendert\n";
   }
}
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread MainWindow Events