Hi,
I’m trying to create my own DirectSlider that have multiple thumbs. I’m having problems with defining my constructor:
class MultipleDirectSlider(DirectSlider):
"""
"""
def __init__(self, parent = None, **kw):
"""
"""
# Call the parent's constructor
DirectSlider.__init__(self,parent,**kw)
# For the other thumbs
#self.thumbs = []
def addThumb(self,**params):
"""
Add a new thumb to the Sliderbar
"""
# Get the required params
thumb = self.createcomponent("thumb", (), None,
DirectButton, (self,),
borderWidth = self['borderWidth'])
self.thumbs.append(thumb)
# Return the position of the Event
return len(self.thumbs) -1'''
What I get from running this code is the Sliderbar, sans bar. I don’t understand what I’m doing wrong.
Thanks.