> On Fri, 7 Feb 1997, Nuno Grilo wrote:
> 
> > I'm new to tcl/tk programming and this may have nothing to do with 
> > Visual TCL but can anybody tell me how to exit the application when
> > the toplevel is closed by the window manager?
> > 
> > This happens automatically with some tcl/tk programs but not with
> > projects created with Visual TCL.
> 
>  tcl/tk applications automatically terminate when the root window "."
>  is destroyed. Visual Tcl hides the "." window so when you close your
>  application window, it is not closing the root, it is closing something
>  like ".top1".  In order to have the application close, you will need to
>  call "exit" somwhere in your code. 
> 
>  -stewart-

if your toplevel widget is .top1, try this:

bind .top1 <Destroy> exit

then whenever the toplevel is exited, tcl/tk will exit too.
--
Peter Gross
Probita, Inc.
[EMAIL PROTECTED]
+1.303.546.6307 x3329

Reply via email to