title: Horizontal Scrollbar for Treeview
body: <p>I have attached a vertical and horizontal scrollbar for a tkinter treeview in Python. For some reason, the horizontal bar is not working. The treeview is filled with a directory structure with root selected by the user, and the scrollbar does not become active when I expand the paths. The example bellow does not present that structure, but has a long string inside the treeview, and even here the scrollbar does not work.</p>
  <pre><code>import tkinter as tk 
  from tkinter import ttk
  
  root = tk.Tk()
  root.title(&quot;Files for Replication&quot;)
  
  tree_frame = tk.Frame(root) 
  tree_frame.place(relx=0, rely=0, relwidth=0.5, relheight=1)
  
  # Treeview
  treeview = ttk.Treeview(tree_frame)
  treeview.heading(&quot;#0&quot;, text=&quot;Name&quot;, anchor=tk.W)
  treeview.place(relx=0.02, rely=0.3, relwidth=0.9, relheight=0.5)
  treeview.bind('&lt;Shift-Right&gt;', callback_main)
  treeview.bind('&lt;Double-1&gt;', callback_dependencies)
  treeview.insert('', '0', 'item1', text=150*&quot;a&quot;)
  tree_scrolly = ttk.Scrollbar(tree_frame, orient=tk.VERTICAL, command=treeview.yview)
  tree_scrolly.place(relx=0.91, rely=0.3, relwidth=0.03, relheight=0.49)
  treeview.config(yscrollcommand=tree_scrolly.set)
  tree_scrollx = ttk.Scrollbar(tree_frame, orient=tk.HORIZONTAL, command=treeview.xview)
  tree_scrollx.place(relx=0.02, rely=0.79, relwidth=0.9, relheight=0.03)
  treeview.config(xscrollcommand=tree_scrollx.set)
  </code></pre>
  <p>Treeview Capture image:
  <img src="https://i.stack.imgur.com/nUTlB.png" alt="Treeview Capture" /></p>
  <p>I would really appreciate some help with this problem, since I have another tkinter appication that uses almost the same code (to be fair, the scrollbars are attached to a Listbox, but that should not be an issue) and is up and running. Thanks in advance.</p>