Discussion:
How to remove minimize/maximize buttons in window?
(too old to reply)
Anders Johannesson
2003-07-22 12:01:34 UTC
Permalink
I want to remove the minimize and maximize buttons in my "About
Box"-window (for my GUI) and just leave the exit button. Tcl/tk is new
for me so if anyone knows I would be really happy.
Anders Johannesson
Luciano
2003-07-22 13:09:31 UTC
Permalink
You can use wm overrideredirect . 1

But that OS-provided [X] exit button will disappear too. The entire
caption bar will disappear. You will have to build your own Exit
button on another spot of the GUI.
--
Luciano ES
<***@ggmmxx.nneett>
Santos, SP - Brasil

<-quote-> **************************************************
Post by Anders Johannesson
I want to remove the minimize and maximize buttons in my "About
Box"-window (for my GUI) and just leave the exit button. Tcl/tk
is new for me so if anyone knows I would be really happy.
Anders Johannesson
Derk Gwen
2003-07-22 14:52:39 UTC
Permalink
Anders Johannesson <***@space.se> wrote:
# I want to remove the minimize and maximize buttons in my "About
# Box"-window (for my GUI) and just leave the exit button. Tcl/tk is new
# for me so if anyone knows I would be really happy.

You can try
wm resizeable .about 0 0

You might be able to remove the whole frame with
wm overredirect .about 0

--
Derk Gwen http://derkgwen.250free.com/html/index.html
TEMPORARILY CLOSED
BE OPENED AFTER FIRST PERIOD
Eric Boudaillier
2003-07-22 14:10:22 UTC
Permalink
Post by Anders Johannesson
I want to remove the minimize and maximize buttons in my "About
Box"-window (for my GUI) and just leave the exit button. Tcl/tk is new
for me so if anyone knows I would be really happy.
Under Windows,
wm transient $aboutToplevel .
does the trick.
--
-eric
Robert Heller
2003-07-22 17:32:00 UTC
Permalink
Luciano <***@privacy.net>,
In a message on 22 Jul 2003 13:09:31 GMT, wrote :

L> You can use wm overrideredirect . 1
L>
L> But that OS-provided [X] exit button will disappear too. The entire
L> caption bar will disappear. You will have to build your own Exit
L> button on another spot of the GUI.

toplevel .about
wm transient .about .

Might be better. This leaves the system / window manager menu (at
least with fvwm2 in MWM mode). I don't know if the [X] button is
tossed or not when using a MS-Windows style cone WM or under MS-Windows
itself. The system / window manager includes close and kill elements.

L>
L> --
L> Luciano ES
L> <***@ggmmxx.nneett>
L> Santos, SP - Brasil
L>
L> <-quote-> **************************************************
L> Anders Johannesson wrote on 22 jul 2003:
L>
L> > I want to remove the minimize and maximize buttons in my "About
L> > Box"-window (for my GUI) and just leave the exit button. Tcl/tk
L> > is new for me so if anyone knows I would be really happy.
L> > Anders Johannesson
L>
Robert Heller
2003-07-22 18:05:12 UTC
Permalink
Luciano <***@privacy.net>,
In a message on 22 Jul 2003 18:08:45 GMT, wrote :

L> Robert Heller wrote on 22 jul 2003:
L>
L> >>L> You can use wm overrideredirect . 1
L> >>L> But that OS-provided [X] exit button will disappear too. The
L> >>entire L> caption bar will disappear. You will have to build
L> >>your own Exit L> button on another spot of the GUI.
L>
L> > toplevel .about
L> > wm transient .about .
L> >
L> > Might be better. This leaves the system / window manager menu
L> > (at least with fvwm2 in MWM mode). I don't know if the [X]
L> > button is tossed or not when using a MS-Windows style cone WM or
L> > under MS-Windows itself. The system / window manager includes
L> > close and kill elements.
L>
L> Hmmm... no, your solution doesn't seem to work on Windows. The
L> caption is still there, with system menu, minimize, maximize, close
L> and a cherry on the top.

Note that you can't make your root toplevel window (.) a transient, only
new toplevels. What transient is meant for is pop-up dialog windows.
"Transient" don't get their own icon (on the task bar or whatever) and
cannot be minimized on their own. They get minimized, when the window
that they are transient for gets minimized. They also are supposed to
always be on top of the window that they are transient for.

L>
L> This "transient" thing is something I still haven't gotten around to
L> study. I know there is an entire wiki on page on that, but I am too
L> busy to dillydally around the wiki today.
L>
L> --
L> Luciano ES
L> <***@ggmmxx.nneett>
L> Santos, SP - Brasil
L>
Homer Meyer
2003-07-23 00:58:38 UTC
Permalink
Post by Anders Johannesson
I want to remove the minimize and maximize buttons in my "About
Box"-window (for my GUI) and just leave the exit button. Tcl/tk is new
for me so if anyone knows I would be really happy.
Anders Johannesson
If you are running under Windows, you can use:

wm attributes .about -toolwindow 1

Continue reading on narkive:
Loading...