package LoginFenster; use strict; use Tk; use vars qw($VERSION); $VERSION = 0.01; use Alias qw(attr); use vars qw($MW); my %felder = ( MW=>undef, ); sub new { my $that = shift; my $class = ref($that)||$that; my $self = { %felder, }; bless $self, $class; init(); return $self; } sub init { $MW = tkinit(-title=> 'Anmeldung'); #... MainLoop; } sub isHidden { if ($MW->state eq 'withdrawn'){ return 1; } return 0; } sub raiseup { $MW->deiconify; $MW->raise; $MW->focus; } sub hide { $MW->withdraw; } sub toggle { if(isHidden()){ raiseup(); } else{ hide(); } } 1;