Dialog (and the derived DialogBox) does a non configurable global grab in its Show method so no, other than sub-classing and using a substitute Show method, you can't make Dialog non-blocking.

However, it would be trivial to write your own version of a non-blocking "Dialog" pop up window. Something like this should give you a starting point.

#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = tkinit; $mw->update; my $number; notify( $mw, "Notification Window #" . ++$number, 4000 ); $mw->repeat( 5000, sub { notify( $mw, "Notification Window #" . ++$number, 4000 ) } ) +; MainLoop; sub notify { my ( $mw, $message, $ms ) = @_; my $notification = $mw->Toplevel(); $notification->transient($mw); $notification->overrideredirect(1); $notification->Popup( -popanchor => 'c' ); my $frame = $notification->Frame( -border => 5, -relief => 'groove +' )->pack; $frame->Label( -text => $message, )->pack( -padx => 5 ); $frame->Button( -text => 'OK', -command => sub { $notification->destroy; undef $notification +}, )->pack( -pady => 5 ); $notification->after( $ms, sub { $notification->destroy } ); }

In reply to Re: Non blocking a Dialog box in Perl Tk by thundergnat
in thread Non blocking a Dialog box in Perl Tk by lakshmananindia

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.