Solved

perl tkx question

Posted on 2009-05-12
1
1,105 Views
Last Modified: 2012-06-27
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
Comment
Question by:1030071002
1 Comment
 

Accepted Solution

by:
1030071002 earned 0 total points
Comment Utility
#!/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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video discusses moving either the default database or any database to a new volume.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now