(self, master=None, variable=None, from_=0, to=10, **kw)
Construct a horizontal LabeledScale with parent master, a
        variable to be associated with the Ttk Scale widget and its range.
        If variable is not specified, a tkinter.IntVar is created.

        WIDGET-SPECIFIC OPTIONS

            compound: 'top' or 'bottom'
                Specifies how to display the label relative to the scale.
                Defaults to 'top'.
Construct a horizontal LabeledScale with parent master, a
        variable to be associated with the Ttk Scale widget and its range.
        If variable is not specified, a tkinter.IntVar is created.
Construct a horizontal LabeledScale with parent master a variable to be associated with the Ttk Scale widget and its range . If variable is not specified a tkinter . IntVar is created .
def __init__(self, master=None, variable=None, from_=0, to=10, **kw):
        """Construct a horizontal LabeledScale with parent master, a
        variable to be associated with the Ttk Scale widget and its range.
        If variable is not specified, a tkinter.IntVar is created.

        WIDGET-SPECIFIC OPTIONS

            compound: 'top' or 'bottom'
                Specifies how to display the label relative to the scale.
                Defaults to 'top'.
        """
        self._label_top = kw.pop('compound', 'top') == 'top'

        Frame.__init__(self, master, **kw)
        self._variable = variable or tkinter.IntVar(master)
        self._variable.set(from_)
        self._last_valid = from_

        self.label = Label(self)
        self.scale = Scale(self, variable=self._variable, from_=from_, to=to)
        self.scale.bind('<<RangeChanged>>', self._adjust)

        # position scale and label according to the compound option
        scale_side = 'bottom' if self._label_top else 'top'
        label_side = 'top' if scale_side == 'bottom' else 'bottom'
        self.scale.pack(side=scale_side, fill='x')
        # Dummy required to make frame correct height
        dummy = Label(self)
        dummy.pack(side=label_side)
        dummy.lower()
        self.label.place(anchor='n' if label_side == 'top' else 's')

        # update the label as scale or variable changes
        self.__tracecb = self._variable.trace_variable('w', self._adjust)
        self.bind('<Configure>', self._adjust)
        self.bind('<Map>', self._adjust)
def __init__ ( self , master = None , variable = None , from_ = 0 , to = 10 , * * kw ) : self . _label_top = kw . pop ( 'compound' , 'top' ) == 'top' Frame . __init__ ( self , master , * * kw ) self . _variable = variable or tkinter . IntVar ( master ) self . _variable . set ( from_ ) self . _last_valid = from_ self . label = Label ( self ) self . scale = Scale ( self , variable = self . _variable , from_ = from_ , to = to ) self . scale . bind ( '<<RangeChanged>>' , self . _adjust ) # position scale and label according to the compound option scale_side = 'bottom' if self . _label_top else 'top' label_side = 'top' if scale_side == 'bottom' else 'bottom' self . scale . pack ( side = scale_side , fill = 'x' ) # Dummy required to make frame correct height dummy = Label ( self ) dummy . pack ( side = label_side ) dummy . lower ( ) self . label . place ( anchor = 'n' if label_side == 'top' else 's' ) # update the label as scale or variable changes self . __tracecb = self . _variable . trace_variable ( 'w' , self . _adjust ) self . bind ( '<Configure>' , self . _adjust ) self . bind ( '<Map>' , self . _adjust )