diff options
author | Guido van Rossum <guido@python.org> | 1999-01-12 22:09:18 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-01-12 22:09:18 (GMT) |
commit | 5cc3129260e33c6a736c78a07f4df1b3cc06e206 (patch) | |
tree | 5010ea28107f03ca6baced6375110433e1d190aa /Tools/idle/Separator.py | |
parent | 8d43a2937b03a99c88e0a690221f49f539337771 (diff) | |
download | cpython-5cc3129260e33c6a736c78a07f4df1b3cc06e206.zip cpython-5cc3129260e33c6a736c78a07f4df1b3cc06e206.tar.gz cpython-5cc3129260e33c6a736c78a07f4df1b3cc06e206.tar.bz2 |
Vladimir Marangozov's patch:
The separator dances too much and seems to jump by arbitrary amounts
in arbitrary directions when I try to move it for resizing the frames.
This patch makes it more quiet.
Diffstat (limited to 'Tools/idle/Separator.py')
-rw-r--r-- | Tools/idle/Separator.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tools/idle/Separator.py b/Tools/idle/Separator.py index 26cdf6c..2645e57 100644 --- a/Tools/idle/Separator.py +++ b/Tools/idle/Separator.py @@ -45,6 +45,7 @@ class Separator: f[dim] = getattr(f, "winfo_"+dim)() self.div.bind("<Motion>", self.div_motion) self.div.bind("<ButtonRelease-1>", self.div_release) + self.div.grab_set() def div_motion(self, event): delta = getattr(event, self.dir) - getattr(self.press_event, self.dir) @@ -61,6 +62,7 @@ class Separator: def div_release(self, event): self.div_motion(event) self.div.unbind("<Motion>") + self.div.grab_release() class VSeparator(Separator): @@ -84,6 +86,7 @@ def main(): tlist.append(t) tlist[0].insert("1.0", "Make your own Mondrian!") tlist[1].insert("1.0", "Move the colored dividers...") + root.mainloop() if __name__ == '__main__': main() |