Skip to content

Fix display of figure window mouse coordinates using wx python backends. #30377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tohc1
Copy link
Contributor

@tohc1 tohc1 commented Jul 31, 2025

Fix display of figure window mouse coordinates using wx python backends.
Currently the mouse coordinates are not visible when using the wx python backend.

This sets an initial size to the text control used to display the coordinates currently the width is set to 0 when NavigationToolbar2Wx.Realize() is called as there is no label text specified and no size defined.

Setting an initial size of (120,-1) should work for most systems unless the font size is very large.
Alternatively NavigationToolbar2Wx.Realize() can be called in NavigationToolbar2Wx. set_message() after the label text is set so that space in the toolbar is allocated however this causes flickering.

I found a related bug [Bug]: wx + windows draws mouseover cursor text beyond the toolbar's extents #22014
closes #22014

PR summary

PR checklist

Fix display of figure window mouse cordinates using wx python backends.

Label text requires an initial size to be given to have none zero dimensions in toolbar.
@anntzer
Copy link
Contributor

anntzer commented Jul 31, 2025

Does the patch at #22014 (comment) (plus version gating to only do it on Windows) not work for you? That would seem better than hardcoding a size...

@tohc1
Copy link
Contributor Author

tohc1 commented Aug 1, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: wx + windows draws mouseover cursor text beyond the toolbar's extents
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy