Dietmar
Can't thank you enough.
While the StaticLabel mention was a bust (I'd tried that already as
that's how I used to do things years ago), something about either the
way you wrote, or the git hub post, had me going down the route of
wx.Accessible, and writing this:
class AccessibleSlider(wx.Accessible):
def __init__(self, widget, name="Custom Widget"):
super().__init__()
self.widget = widget
self.name = name
def GetName(self, childId):
"""Return the accessible name."""
return (wx.ACC_OK,
self.name)
def GetValue(self, childId):
"""Return the accessible value."""
return (wx.ACC_OK, str(self.widget.GetValue()))
def GetRole(self, childId):
"""Return the accessible role (e.g., slider, button)."""
return (wx.ACC_OK, wx.ROLE_SYSTEM_SLIDER)
#def GetDescription(self, childId):
#"""Return an additional description."""
#return (wx.ACC_OK, "This is a custom accessible slider.")
Low and behold, sld.SetAccessible witht that, we have a gorgious slider
label.
I've commented out get description because it read that description out
every time and it got massively annoying very fast.
Combine that with using SetLabel on wx.listctrl, sticking to SetName for
wx.textctrl and I think. *think* I'm there! A happy upgrade.
Goign to feel weird running a modern wx python version for the firs
ttime in years :)
Course, this is where you mention wx.Accessible is being removed in the
next pull request :)
Thanks for sticking with me, and don't hesitate to let me know if you
want me to try something else.
Nathan