Thread Dialog aus Dialog anzeigen (6 answers)
Opened by theresa at 2008-02-14 14:15

Strat
 2008-02-18 09:43
#106026 #106026
User since
2003-08-04
5246 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
#$dialog -> protocol( 'WM_DELETE_WINDOW'=>sub {exit(); } );


probier mal:
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
$mw->protocol('WM_DELETE_WINDOW', [ \&ExitApplication, $mw] );

# ------------------------------------------------------------
sub ExitApplication {
    my ($mw) = @_;
    my $dialog = $mw->Dialog(-text => 'Programm wirklich beenden?',
                             -bitmap => 'question',
                             -title => 'Programm beenden',
                             -default_button => 'Yes',
                             -buttons => [qw/Ja Nein/],
                             );

    my $answer = $dialog->Show(); # and display dialog
    if( lc($answer) eq 'ja' ){
        exit;
        # oder: $mw->destroy();
    }
    else {
        # continue
    } # else

} # ExitApplication
perl -le "s::*erlco'unaty.'.dk':e,y;*kn:ai;penmic;;print"
http://www.fabiani.net/

View full thread Dialog aus Dialog anzeigen