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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating new windows

Status
Not open for further replies.

jlynch1

Technical User
Dec 20, 2001
100
IE
I have a menu made in my tcl/tk application.
It has a help menu and when the help button is clicked on the menu I want it to open a new window that I can defined myself which just conatins text etc.

How do i go about doing this
 
I'm not quite sure what you mean, but the first thing I thought about, after I read your message was a top-level window. You know:
[tt]
toplevel .fr1
[/tt]

and so on ...
 
I want to open up a new window.
say for example when you click on the about button in the menu of a gnome terminal you get a new window up which conatins info about the authors etc
 
Ok. you make a button
[tt]
proc open_window {} {
toplevel .new_win
label .new_win.l1 -text "The Author is ...."
#or you can put here the text-widget you wanted
grid .new_win.l1
}

button .b1 -text "Author" -command open_window
[/tt]
 
what is the difference between the 2 commands:
toplevel .mainWindow
wm title .mainWindow
?
 
toplevel .mainWindow creates a new (presumably 2nd) window whose [red]path[/red] is ".mainWindow".
wm title .mainWindow would change the name of the window whose path is ".mainWindow" to something if you specified an argument, say, wm title .mainWindow "your name here"

_________________
Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top