Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Python only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Python
wxSlider with floating point values
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
ilSignorCarlo
New Member
Join Date:
Nov 2007
Posts:
5
#1
wxSlider with floating point values
Nov 23 '07, 11:26 AM
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
Join Date:
Sep 2006
Posts:
6478
#2
Nov 23 '07, 06:23 PM
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
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment