If that does not fix the issue. What I did to get around the issue in
the past was to use int.
dc.DrawText(txt, int(x), int(y))
That did not seem to change the location of the text - at least in my
app. ReportLab has the same issues.
In my pem_mixin.py at line 3429 I have:
if self._angle == 0:
dc.DrawText(txt,int( x), int(y))
Hope this helps.
Also I am using wxpython 4.2.2
Johnf
On 12/10/24 7:51 AM, Ed Leafe wrote:
On Jun 24, 2023, at 08:13, Ed Leafe <[email protected]> wrote:
In several places, e.g. dPemMixin.py", line 3475, wherever screen coordinates
are passed from Dabo to wx, they are passed as just generic numbers, which the wx
tolerated before. Now it's a runtime error, namely
dc.DrawText(txt, x, y)
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'
Is there anything we can do about this?
The 'master' branch of Dabo has been inactive for about a decade now. Several
years ago I made a brief attempt at updating the code base to use Python 3.x
and wxPython 4.x, and got some of it working. That is now in the 'dabo3'
branch, where any changes like the one you mention would be made.
I haven't kept up on the changes to wxPython; it was hard enough to get some
basic compatibility with 4.x. Please check out the 'dabo3' branch, and if you
have some suggestions that would fix some issues, please create a pull request
against that branch on GitHub. If you have any other questions, feel free to
ask, and I'll try to help as much as I can.
Now that I've been working with Dabo again, I've fixed several of these changes.
The new `main` branch is the former `dabo3` branch, so please use that. If you
find any more cases where things aren't working right, please let me know.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/[email protected]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/[email protected]