Skip to content

Instantly share code, notes, and snippets.

@gabrieldp
gabrieldp / range_slider.py
Last active September 24, 2025 12:41
wxPython Custom Range Slider Widget
import wx
def fraction_to_value(fraction, min_value, max_value):
return (max_value - min_value) * fraction + min_value
def value_to_fraction(value, min_value, max_value):
return float(value - min_value) / (max_value - min_value)