Open chriskiehl opened 4 years ago
I this is likely a wxWidgets issue, or an issue in the native widget that may be able to be worked around in wxWidgets. Please create a ticket for this at https://trac.wxwidgets.org/, if one doesn't already exist, and add a link to the ticket here so we can track it.
@chriskiehl I will open the wxWidgets bug report for you.
Confirmed with a C++ program using wxWidgets.
https://trac.wxwidgets.org/ticket/18808
I think this issue can be closed now. It's not a bug in wxPython.
This is not a high priority bug for wxWidgets as there is a workaround. Is it possible that the workaround could be implemented in wxPython so that it least it works for every wxPython application?
Is it possible that the workaround could be implemented in wxPython so that it least it works for every wxPython application?
Probably not. There isn't a clear way to do it that would be transparent, not impose unnecessary overhead, and not have a possibility of causing other problems or side-effects.
OK. We might as well close this issue, then.
Operating system: Ubuntu 16.04 wxPython version & source: WxPython 4.0.7 (using the prebuilt wheel provided here) Python version & source: Python 3.5, stock
Description of the problem:
When a parent Freeze/Thaws,
wx.TextCtrl
's "lose" their insertion point in the UI and snap back to the top of the input. Note that this is only in the actual UI. The internal state of theTextCtrl
'sInsertionPoint
remains the same before/after thawing. Additionally, all that's needed to work around this is to 'jiggle' the component after thawing by setting itsInsertionPoint
to the same value it already contains.Example of the issue:
This'll launch an app, then fill in the text control with enough data to force it to scroll down. Then, shortly after, it'll freeze/thaw the main Window, and the TextCtrl's insertion will snap back to the top of the input.