title: Make tkinter Scale span it's full grid cell
body: <p>I have a Tkinter <code>ttk.Scale</code> in a GUI. What I want to do is add some labels on the top or bottom (or side if its vertical) that show the values the user is selecting through. I have a minimum working example shown below.</p>
  
  <p>My problem comes from the fact that I cannot figure out how to get the Scale to line up with the labels. It is set to span all the columns of the labels, but the Scale widget comes with a length keyword that automatically forces it to be 100 pixels in size. I can't know, a priori, what to set that length to and I can't figure out how to tell it to fill its grid space.</p>
  
  <p><strong>Is there a way to tell the Scale to choose a length such that it fills its grid space?</strong></p>
  
  <pre><code>import tkinter as tk
  from tkinter import ttk
  
  def show_values():
      print (w1.get())
  
  def scaleFunc(val):
      scaleVal = float(w1.get())
      if int(scaleVal) != scaleVal:
          w1.set(round(float(val)))
  
  root = tk.Tk()
  for i,text in enumerate(['O','B','A','F','G','K','M','L']):
      ttk.Label(root, text = text).grid(row=0,column=i,padx=10)
  
  w1 = ttk.Scale(root, to=7, command=scaleFunc, length=None)
  w1.grid(row = 1, column = 0, columnspan = 8,ipadx=0)
  
  ttk.Button(root, text='Show', command=show_values).grid(row=2,column=0,columnspan=8)
  
  root.mainloop()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Dpq6A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dpq6A.png" alt="enter image description here"></a></p>