Solved

perl tkx question

Posted on 2009-05-12
1
1,109 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
ID: 24371693
#!/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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Extract multiple value with delimiters from a string 4 168
Awk Question 2 123
How to generate square thumbnail using perl 13 77
read an xml file in perl 2 15
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

910 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

22 Experts available now in Live!

Get 1:1 Help Now