in reply to How to get rid of system buttons on Tk::Toplevel
So I think the answer is "no", you can't control the presence/absence of these buttons from within the Perl/Tk script. With some window managers (in X Windows), you can control which windows get title bars or don't (based on process or window names), and even dictate what control buttons are provided on title bars generally, but this isn't something that a Perl/Tk script can do for itself, by itself. (X window managers also provide a "border" on all windows, which can be used to move or resize windows instead of a title bar.)
A Perl/Tk process can, of course, dictate its own geometry and placement to the window manager, meaning that it should be possible to control placement and size of the app window even when you create it without a title bar. But if the user needs to adjust this during runtime, it's better to leave that to the standard window-manager methods.
The next step may be to focus on why you don't want the window to provide these buttons; "minimize" seems harmless (and I'd recommend keeping it in any case), while "maximize" can be annoyance when hit by mistake (but maybe $topwin->resizable(0,0) might help), and "close" could be nasty if you don't have an appropriate mechanism to handle that sort of event -- but this is what "OnDestroy(callback)" is for (not to mention the END block).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to get rid of system buttons on Tk::Toplevel
by svad (Pilgrim) on May 27, 2002 at 06:00 UTC |