On Mon, 25 Sep 2000, Stef Pillaert wrote:

Here a a couple of answers...

> : **What is the easiest way to disable all the buttons temporarily in
> my application? I tried with "option add", but this is only for
> buttons created afterwards, no? Can I configure a whole Class? I want
> to prevent the user to push the buttons, but he still has to be able
> to use a few other widgets in other windows that are opened (a
> scrollbar,...), so I don't think I can use grab (please correct me if
> I'm wrong...)

Sounds like grab won't do what you want. You might have to build a list of
all the buttons and then loop through them and do "$buttonPath config
-state disabled" to disable them, etc. Hopefully somebody has a better
idea. I have at times had the same situation, but couldn't think of
anything reasonable to do about it. I don't think I've ever seen an app
that does this anyway. Have you?

> **can I prevent the user to destroy a (popup)window (with the "X" in the
> top-right of the window)?

I have had problems in the past with "bind <Destroy>", so I highly
recommend the following, which has never failed me (on UNIX; I don't know
about Windows):

    wm protocol $w WM_DELETE_WINDOW "myProc myArg1 myArg2"

where myProc can do whatever you wish, including not even giving the user
the option to actually exit.

> **in the archived vtcl-mailing-list, I read something about a
> "variable" window. Is there such a thing? Is it a window where I can
> declare global vars?

That window never did anything useful. You have to declare global vars in
procedures that use them. Set the initial values of global vars in the
main and/or init procs that vTcl supplies.

...RickM...

_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user

Reply via email to