【问题标题】:Is there anyway to bind an event handler to a Tkinter window being moved?无论如何将事件处理程序绑定到正在移动的 Tkinter 窗口?
【发布时间】:2011-05-08 01:43:48
【问题描述】:

我正在尝试这样做,以便如果以任何方式拖动或移动 Tkinter 窗口,则会调用一个函数。有没有办法做到这一点?

这是在 Windows 7 中。

【问题讨论】:

    标签: python windows-7 window tkinter drag


    【解决方案1】:

    可能是配置事件。

    http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm

    搜索:

    <Configure>
    The widget changed size (or location, on some platforms). The new size is 
    provided in the width and height attributes of the event object passed to the callback.
    

    【讨论】:

      猜你喜欢
      • 2014-08-12
      • 1970-01-01
      • 1970-01-01
      • 2012-11-06
      • 2023-04-02
      • 2018-10-16
      相关资源
      最近更新 更多