w3ntp has asked for the wisdom of the Perl Monks concerning the following question:

I am creating a simple Frame using Perl/Tk and would like to have the small "x" button on the very top right of the Frame Rectangle disabled so that the user can either minimize the Frame or change its size but not close it. Any suggestions as to an option? thanks w3ntp
  • Comment on How to disable Perl/TK Frame widget close button

Replies are listed 'Best First'.
Re: How to disable Perl/TK Frame widget close button
by brian_d_foy (Abbot) on May 27, 2005 at 18:52 UTC
      The WM_DELETE_WINDOW command did the trick. thanks you very much, w3ntp
Re: How to disable Perl/TK Frame widget close button
by scmason (Monk) on May 27, 2005 at 20:53 UTC
    You can also simply override redirection to the window manager, so that the window manager does not draw the window controls at all by calling this on your main window:

    $mw->overrideredirect(0);

    This is useful for splash screens or static windows (like desktop monitors etc)

    Shane

    "Never take yourself too seriously, because everyone knows that fat birds dont fly" -FLC