[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1132
  • Last Modified:

perl tkx question

I am trying make a message box that have a yes and no but the message box yes no button must be clickable

can some one point me in the right direction
0
1030071002
Asked:
1030071002
1 Solution
 
1030071002Author Commented:
#!/usr/local/bin/perl
use Tkx;

# Main Window
my $mw = new MainWindow;
my $button = $mw-<Button(-text=<"Show Quit Dailog", -command =< \&exitTheApp)-<pack();

sub exitTheApp {
Tkx::$response = $mw -< messageBox(-message=<"Are you sure you want to quit and giving me the choice of Yes or No",-type=<'yesno',-icon=<'question');
      
      if( $response eq "Yes" ) {
            exit
      } else {
            $mw -< messageBox(-type=<"ok", -message=<"I know you like this application!");
      }
}

MainLoop;


 Tkx::tk___messageBox(-parent => $mw,-icon => "info",-title => "Tip of the Day",-message => "Please be nice!",);


0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now