Skip to content

Fix ResizeEvent handling for TextBox - #32225

Open
QuLogic wants to merge 1 commit into
matplotlib:mainfrom
QuLogic:textbox-resize
Open

Fix ResizeEvent handling for TextBox#32225
QuLogic wants to merge 1 commit into
matplotlib:mainfrom
QuLogic:textbox-resize

Conversation

@QuLogic

@QuLogic QuLogic commented Aug 18, 2026

Copy link
Copy Markdown
Member

PR summary

A ResizeEvent is not a LocationEvent subclass, so it does not need to be reparented to the correct Axes.

Fixes #32222

AI Disclosure

None

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • [n/a] Plotting related features are demonstrated in an example
  • [n/a] New features and API changes have release notes
  • [n/a] Documentation complies with general and docstring guidelines

A `ResizeEvent` is not a `LocationEvent` subclass, so it does not need
to be reparented to the correct `Axes`.

Fixes matplotlib#32222
@QuLogic QuLogic added this to the v3.11.2 milestone Aug 18, 2026

@timhoffm timhoffm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could typing have caught this?

@QuLogic

QuLogic commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

Possibly, though we've only annotated FigureCanvasBase.mpl_connect with overloads for each event. This was connected with AxesWidget.connect_event, which has no overloads defined yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TextBox widget raises AttributeError on ResizeEvent

2 participants