Hi,
Is there a way to make a Perl/Tk window's close ('X') button disabled? I know how to ignore clicking it using the technique described here, but I would much rather have it disabled.
I'm using Perl/Tk on Windows.
Thanks,
splintor
Hi,
Is there a way to make a Perl/Tk window's close ('X') button disabled? I know how to ignore clicking it using the technique described here, but I would much rather have it disabled.
I'm using Perl/Tk on Windows.
Thanks,
splintor
If you are in a Unix environment you are out of luck. The "close" button is managed by the Window Manager
of the desktop which is a completely different process that you have no control on.
Even if by a hack you disable the "close" button the user can always bring it back if the window manager permits this. The enlightenment window manager for example can enable/disable all window buttons on demand.
The technique you give in the link is doing exactly this. It does not remove
the "close" button. It just gives a hint to the window manager (WM_DELETE_WINDOW
).
It is up to the window manager if this hint will be honoured or not.
See also the icccm and NetWM pages.
What you want might be possible on Windows, but my experience with this OS is limited so perhaps another poster will know this.