in reply to Understanding Tk::DialogBox

Pressing any of the buttons on a DialogBox causes it to close, the callback you give to -command is called when you press any button, and is given the name of the pressed button as its argument. So, one answer is that you already have a callback sub that gets called.

The second is that calling Show returns the text of the pressed button, when the DialogBox is closed, so you can also just do:

my $answer = $config->Show(); myApplySub() if($answer eq 'Apply');

C.

Replies are listed 'Best First'.
Re^2: Understanding Tk::DialogBox
by rvosa (Curate) on May 12, 2005 at 01:00 UTC
    Bingo! That's it. Thanks.