Phoenix icon indicating copy to clipboard operation
Phoenix copied to clipboard

GenericButton does not work

Open rscottha opened this issue 3 years ago • 1 comments
trafficstars

Operating system:Linux (Manjaro) wxPython version & source: 4.0.7.post2 pacman Python version & source: 3.10.4 distro

Description of the problem: GenericButtons fails in wxDemo and there is a similar fail in wxGlade. Standard out from wxDemo is: Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/wx/lib/buttons.py", line 492, in OnPaint self.DrawLabel(dc, width, height) File "/usr/lib/python3.10/site-packages/wx/lib/buttons.py", line 452, in DrawLabel dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy) TypeError: DC.DrawText(): arguments did not match any overloaded call: overload 1: argument 2 has unexpected type 'float' overload 2: argument 2 has unexpected type 'float'

Code Example (click to expand)
# Put code sample here

rscottha avatar May 05 '22 23:05 rscottha

This is due to a change in Python 3.10. It was fixed a while ago: https://github.com/wxWidgets/Phoenix/commit/173d0796810bb65de9bdfdc6941d24a04628f6c2

If you are using a distribution package, you could ask them to pick up that patch.

swt2c avatar May 06 '22 00:05 swt2c