This is in reply to ZigZag about an issue with onoffbutton.py, which I, unfortunately, can’t recall where I originally posted.
I’m prepared to admit, I removed all traces of Microsoft from my life some 20 years ago, so I only test code on Linux. I also test on the version of python, currently 3.8.10, which comes standard on my OS.
I avoid virtual machines, as the box I have is tiny, due to living off grid and electricity shortfalls.
My excuses made, as far as I can tell, the issues lie with python3 version 10+ being more fussy about things and MS Windows.
Feel free to test this updated version and get back to me if there are still issues. I expect there could still be an issue around font.GetPixelSize(), where if it isn’t available I simply guess. I have no way of testing it, as it works happily on Linux.
Update: 2nd attempt to resolve font issues
onoffbutton.py (22.4 KB)