Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Titlebar in Win32

Status
Not open for further replies.

scriptico

Programmer
Jan 9, 2001
6
0
0
DE
Hi folks!

I`m doing Tcl/Tk under Win32 and want to display only the
title in the titlebar of a toplevel-widget.
That means I want to get rid of the three buttons in the
upper right corner ( iconify-, maximize- and close-button).

Have a nice day!
 
Hi man,
you have to use the "wm" command like that:
toplevel .t
wm title .t "title"

Have fun!
 
Thanks to bilbao,

but I know how to change the title of a toplevel.
I just want to get rid of the three buttons
(iconify, maximize, close) on a win32-platform.
Is there any way?

Ey Caramba !
 
I can't think of any way to do it. It's not really Tcl's fault. Those "window decorations" are added by the window manager (part of the operating system for Windows, a separate application like mwm on Unix), and are completely under its control. Microsoft has decided that it is a Good Idea not to turn off those three icons, and so we don't have an easy way for you to do so in Tcl.

About the only way to "turn off" those three icons would be to tell the window manager you didn't want it to manage that toplevel window. The command to do so (assuming the window's name is .d) is:

[tt]wm overrideredirect .d 1[/tt]

But when you do this, you don't get any titlebar. You don't even get a border or resize handles, so there's no easy way to even allow the user to move the window around. "Overrideredirect" windows are typically used only for start-up splash pages and other special-purpose windows designed for limited interaction with the user. - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Hi, Ken Jones!

I thought there is no way, but now I know there is none.
Maybe I will find some time to migrate to UNIX/LINUX and
will have a much better time. (hope so!)

Many thanks and good wishes !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top