set_slider_rounding

lib.gui.control_helper.set_slider_rounding(value, var, d_type, round_to, min_max)

Set the value of sliders underlying variable based on their datatype, rounding value and min/max.

Parameters:
  • var (tkinter.Var) – The variable to set the value for

  • d_type ([int, float]) – The type of value that is stored in var

  • round_to (int or list) – If d_type is float then this is the decimal place rounding for var. If d_type is int then this is the number of steps between each increment for var. If a list is provided, then this must be a list of discreet values that are of the correct d_type.

  • min_max (tuple (int, int)) – The (min, max) values that this slider accepts