Hello... as title says, I would like to freeze a button while it is in the active mode. This is perhaps a simple question that you think I might get from web, but I just can't relate how to do that with my real code. I knew that a button can be set on it's state to 'normal', 'active' and 'disabled', but how do I apply it within my code bellow if each button below incurred some other subroutines? I just want to freeze the button "run all" until the job of invoking the job1, job2 & job3 button is done. Also, another side question on my flash button, why is it not flashing when the "run all" button is pressed? Thanks for your help.

my $run_all_btn=$mw->Button( -text => 'run all', -width => 20, -height => 2, -activebackground => 'red', -background => 'green', -command => sub { $run_job1->invoke(); $run_job2->invoke(); $run_job3->invoke(); #I want the button freeze until run compl +etion of all buttons job1, 2 and 3. })->pack(); $run_all_btn->flash(); #seem not working

In reply to How to freeze a button while it is in active mode by Janish

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.