You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pressing "enter" or "numpad enter" within a TextBox has no effect when using the WxAgg backend
Code for reproduction
# Based on https://matplotlib.org/3.1.1/gallery/widgets/textbox.htmlimportnumpyasnpimportmatplotlib.pyplotaspltfrommatplotlib.widgetsimportTextBoximportmatplotlibasmpl#mpl.use('TkAgg') # Enter and numpad enter work fine#mpl.use('Qt5Agg') # Enter and numpad enter work finempl.use('WxAgg') # Neither enter nor numpad enter workfig, ax=plt.subplots()
plt.subplots_adjust(bottom=0.2)
t=np.arange(-2.0, 2.0, 0.001)
s=t**2initial_text="t ** 2"l, =plt.plot(t, s, lw=2)
defsubmit(text):
print(text)
plt.draw()
axbox=plt.axes([0.1, 0.05, 0.8, 0.075])
text_box=TextBox(axbox, 'Evaluate', initial=initial_text)
text_box.on_submit(submit)
plt.show()
Actual outcome
With the TkAgg and Qt5Agg backends, pressing "enter" or "numpad enter" within a TextBox work as expected (you see the printed value of the box text in the console).
With the WxAgg backend you can enter/delete characters but the enter keys have no effect.
Expected outcome
The enter keys should work equally well in all of these backends.
Note: Clicking into and then out of the TextBox still works regardless of the backend chosen
Matplotlib version
Operating system: Windows 10
Matplotlib version: 3.1.1
Matplotlib backend (print(matplotlib.get_backend())): See above - problem is with WxAgg
Python version: 3.7.4
Jupyter version (if applicable): n/a
Other libraries: WxPython 4.0.6
Installed via pip.
The text was updated successfully, but these errors were encountered:
Bug report
Bug summary
Pressing "enter" or "numpad enter" within a TextBox has no effect when using the WxAgg backend
Code for reproduction
Actual outcome
With the
TkAgg
andQt5Agg
backends, pressing "enter" or "numpad enter" within a TextBox work as expected (you see the printed value of the box text in the console).With the WxAgg backend you can enter/delete characters but the enter keys have no effect.
Expected outcome
The enter keys should work equally well in all of these backends.
Note: Clicking into and then out of the TextBox still works regardless of the backend chosen
Matplotlib version
print(matplotlib.get_backend())
): See above - problem is with WxAggInstalled via
pip
.The text was updated successfully, but these errors were encountered: