Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TCL 8.4 - Windows Minimize/Exit/Maximize buttons

109 views
Skip to first unread message

Jon Muckey

unread,
Jul 27, 2015, 11:35:10 AM7/27/15
to
I am looking around for capturing the action/value returned when user clicks on one of the built-in OS (could be Windows, or Linux) minimize/maximize/exit buttons in a TK GUI.

Can someone point me in the right direction on this?

Thanks,
Jon

Robert Heller

unread,
Jul 27, 2015, 12:25:23 PM7/27/15
to
At Mon, 27 Jul 2015 08:35:05 -0700 (PDT) Jon Muckey <crxf...@gmail.com> wrote:

>

> I am looking around for capturing the action/value returned when user clicks
> on one of the built-in OS (could be Windows, or Linux)
> minimize/maximize/exit buttons in a TK GUI.

minimize/maximize Would generate a <Configure> event on the toplevel window:

bind . <Configure> "MyResizeFunction %W %w %h"

proc MyResizeFunction {window newwidth newheight} {
## Handle window resize events here...
}

exit Would trigger the wm protocol . WM_DELETE_WINDOW" script:

wm protocol . WM_DELETE_WINDOW "MyExitButtonHandler"

proc MyExitButtonHandler {} {
## Handle Window close actions here.
}

>
> Can someone point me in the right direction on this?

man n wm
man n bind


>
> Thanks,
> Jon
>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

Jon Muckey

unread,
Sep 4, 2015, 11:32:00 AM9/4/15
to
On Monday, July 27, 2015 at 4:25:23 PM UTC, Robert Heller wrote:
This helped! Thanks.
0 new messages