On Mon, 20 Mar 2000, Peter Wallbridge wrote:

> I am using NT 4.00 server with service pack 6.

Sorry to hear that.  ;-)

> I have been trying to intercept the window close event from the X in the
> top right hand corner. I tried the following:
> 
>         wm protocol . WM_DELETE_WINDOW LdrExit
> 
> However, the window still closes without going to LdrExit.

I use this all the time. It works much better, it seems to me, then 
"bind .top17 <Destroy> LdrExit".

Anyway, I believe your problem is simply that you've got the wrong window
name. It's not ".". It's more likely ".top17", which perhaps you've
already given an alias. So, add this to the {main} proc (not init, because
the window doesn't exist yet when init runs):

global widget
wm protocol $widget(LdrToplevel) WM_DELETE_WINDOW LdrExit

...RickM...

---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).

Reply via email to