A custom Slider widget ?

Hello wxPython-users,

I have begun to create a custom “Slider” widget that allows to use custom bitmaps for the elements of the slider (instead of the fixed wx.Slider).
Here is a small screenshot : http://i.stack.imgur.com/B4nt7.jpg

For this I have reused some code from the wxPython demo, but now I am a bit stuck in the process of finishing this widget…

As atttachment (or here : http://pastebin.com/QiBM6nWy) is the code.

Would someone have the time for a quick look on this code in order to help me to debug/improve it (the code is dirty now, I admit !) ?

  • the widget should be “blended” in the background, instead of white background

  • the button shouldn’t be duplicated when moved

  • the button should only be able to move horizontally, not vertically

Thanks a lot in advance, J

customslider.py (5.52 KB)

PS : I forgot to mention that a topic exists here about it : python - Custom Slider widget with wxPython - Stack Overflow
(I would like to share the final custom “Slider widget” there as well, once it will be finished).

···

On Tuesday, February 25, 2014 3:55:01 PM UTC+1, Basj wrote:

Hello wxPython-users,

I have begun to create a custom “Slider” widget that allows to use custom bitmaps for the elements of the slider (instead of the fixed wx.Slider).
Here is a small screenshot : http://i.stack.imgur.com/B4nt7.jpg

For this I have reused some code from the wxPython demo, but now I am a bit stuck in the process of finishing this widget…

As atttachment (or here : http://pastebin.com/QiBM6nWy) is the code.

Would someone have the time for a quick look on this code in order to help me to debug/improve it (the code is dirty now, I admit !) ?

  • the widget should be “blended” in the background, instead of white background
  • the button shouldn’t be duplicated when moved
  • the button should only be able to move horizontally, not vertically

Thanks a lot in advance, J