Hello,
" h2 = wx.BoxSizer(wx.HORIZONTAL)
green = wx.StaticText(gamma_table, label=“Green”)
h2.Add(green, 0, wx.ALL)
scale_gamma_green = wx.Slider(gamma_table, -1, 2.2, 0.1, 3.0, style=wx.SL_HORIZONTAL|wx.SL_VALUE_LABEL|wx.SL_BOTTOM)
scale_gamma_green.SetLineSize(0.1)
h2.Add(scale_gamma_green, 1, wx.ALL,2)
"
Slider increments by 1 instead of 0.1.
How do I get the slider to increment in steps of 0.1? Thanks.
Regards,
Austin
austin aigbe wrote:
" h2 = wx.BoxSizer(wx.HORIZONTAL)
green = wx.StaticText(gamma_table, label="Green")
h2.Add(green, 0, wx.ALL)
scale_gamma_green = wx.Slider(gamma_table, -1, 2.2, 0.1, 3.0,
style=wx.SL_HORIZONTAL|wx.SL_VALUE_LABEL|wx.SL_BOTTOM)
scale_gamma_green.SetLineSize(0.1)
h2.Add(scale_gamma_green, 1, wx.ALL,2)
"
Slider increments by 1 instead of 0.1.
How do I get the slider to increment in steps of 0.1?
The Slider control only works with integers. You will have to do the
scaling yourself when you fetch and set the values. Multiply the values
here by 10, and divide by 10 when you read the current value.
···
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
I faced this problem a while back. My solution is probably more than you need, but example code with a simple test is at https://github.com/rzzzwilson/Random-Stuff/tree/master/float_slider.
Exactly what I need. Thanks.
···
On Tue, Feb 16, 2016 at 2:52 AM, rzzzwilson rzzzwilson@gmail.com wrote:
I faced this problem a while back. My solution is probably more than you need, but example code with a simple test is at https://github.com/rzzzwilson/Random-Stuff/tree/master/float_slider.
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/FwYHYz9BO2g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.