Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5960b5a

Browse files
authored
Merge pull request #19019 from anntzer/tkresize
Deprecate never used `resize_callback` param to FigureCanvasTk.
2 parents f1e0bb9 + f076d37 commit 5960b5a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*resize_callback* parameter to ``FigureCanvasTk``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
This parameter was never used internally and is deprecated. Tk-level custom
4+
event handlers for resize events can be added to a ``FigureCanvasTk`` using
5+
e.g. ``get_tk_widget().bind('<Configure>', ..., True)``.

lib/matplotlib/backends/_backend_tk.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ def _on_timer(self):
159159
class FigureCanvasTk(FigureCanvasBase):
160160
required_interactive_framework = "tk"
161161

162+
@cbook._delete_parameter(
163+
"3.4", "resize_callback",
164+
alternative="get_tk_widget().bind('<Configure>', ..., True)")
162165
def __init__(self, figure, master=None, resize_callback=None):
163166
super().__init__(figure)
164167
self._idle = True

0 commit comments

Comments
 (0)