title: Tkinter: How do I use the value of a scale-widget to change the text of a label-widget?
body: <p>I'm trying to implement a simple difficulty-slider, so I created a scale-widget.</p>
  <p>Using the slider, the user can select the difficulty-setting he wants to play on. I also want to have a label-widget that displays the chosen difficulty (Easy, Normal, Hard, usw...)</p>
  <p>So the value of the scale-widget is used to continuously update the text of the label-widget. I wrote the following code, but it doesn't seem to work as intended. I think something is wrong with the Adjust_scl-function. Could you help me out?</p>
  <p>I'm quite new to Tk and Python in general.</p>
  <pre><code>from tkinter import *
  
  root = Tk()
  root.title(&quot;Difficulty&quot;)
          
  
  class Difficulty:
  
      def __init__ (self, master):
      
           global vel_1
           vel_1 = IntVar()
  
           self.dif_scale = Scale(master,variable = vel_1,from_ = 3,to = -3,resolution=1, orient=HORIZONTAL, length=450,tickinterval=1, label=&quot;Your Dice Roll Modifier&quot;,showvalue=0,command=self.Adjust_scl)
           self.dif_scale.pack()
  
           self.dif_label = Label(master)
           self.dif_label.pack()
  
      
      def Adjust_scl(self,random_parameter):
  
          if vel_1 == 0:
          self.dif_label.config(text=&quot;Normal&quot;)
          elif vel_1 == -1:
          self.dif_label.config(text=&quot;Challenging&quot;)
          elif vel_1 == -2:
          self.dif_label.config(text=&quot;Hard&quot;)
          elif vel_1 == -3:
          self.dif_label.config(text=&quot;Insane&quot;)
          elif vel_1 == 1:
          self.dif_label.config(text=&quot;Easy&quot;)
          elif vel_1 == 2:
          self.dif_label.config(text=&quot;Walk in the Park&quot;)
          elif vel_1 == 3:
          self.dif_label.config(text=&quot;Storymode&quot;)
  
  
  
  dif = Difficulty(root)
  
  root.mainloop()
  </code></pre>
  <p>The Adjust_scl-function refuses to work without the random_parameter, by the way.</p>