wxSlider with floating point values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ilSignorCarlo
    New Member
    • Nov 2007
    • 5

    wxSlider with floating point values

    Hi,
    is there any way to use the slider in the range between 0 and 1 getting up to 100 or 1000 values?
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Originally posted by ilSignorCarlo
    Hi,
    is there any way to use the slider in the range between 0 and 1 getting up to 100 or 1000 values?
    A subclass is the answer:[CODE=python]

    class FloatSlider(wx. Slider):
    def GetValue(self):
    return (float(wx.Slide r.GetValue(self )))/self.GetMax()[/CODE]

    Comment

    Working...