Horizontal Scrollbar for TreeView not working in Tkinter

Alexandre Gonçalves

I'm creating a system that registers data in a sqlite database. When the system starts, it calls the "def show()" function, which loads all data from the database and generates a Treeview.

I created a horizontal and a vertical Scrollbar. Horizontal Scrollbar is not working.

I created the "list" variable inside the function to simulate the return of a database query. When the "def show()" function is called, it generates a Treeview with data from the "list" variable.

Horizontal Scrollbar is not working. Could you help me solve it, please?

The code is the following (in Github):

GitHub Code Link

I've tried several paths with no solution.

How can I make the horizontal Scrollbar work?

Gprime

It's because your treeview is larger than the window.

To get the scrollbars, you need to make the treeview adjust it's width and height to the window.

Add these lines after the relevant widgets are created.

janela.columnconfigure(1, weight=1)
janela.rowconfigure(1, weight=1)

frame_direita.columnconfigure(0, weight=1)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Cannot enable the scrollbar in Tkinter TreeView

How to get a horizontal scrollbar in Tkinter?

Tkinter Scrollbar not working

Tkinter Treeview scrollbar under the column labels

How to linked scrollbar horizontal for pandas data in tkinter

Python Tkinter: Adding A Horizontal Scrollbar To A Canvas With Pack()

Tkinter. Scrollbar is not working on Canvas

Why is the scrollbar not working in the canvas (tkinter)?

Is there a way to implement a horizontal scrollbar within a ttk.Treeview column?

Horizontal Scrollbar is not working under composite inside a CTabItem

Horizontal scrollbar is not working with JTable in Java Swing

Horizontal scrollbar not working asp.net

How can I attach a vertical scrollbar to a treeview using Tkinter?

Why isn't my tkinter scrollbar working?

Python Tkinter - Put Vertical and Horizontal Scrollbar at the edge of the canvas

How to pack a horizontal scrollbar under the listbox (python and tkinter)?

How do I change this code to add a horizontal scrollbar to a Frame? (tkinter)

Horizontal scrollbar doesn´t work in a kind of table in Tkinter

Button to clear Treeview table in Tkinter not working?

Tkinter treeview to display database results not working

Why is my tkinter horizontal scrollbar squashed in the bottom, right-hand corner, but the vertical scrollbar looks normal?

Python's Tkinter Horizontal Scroll with Buttons not working

Scrollbar for TreeView - Python

Tkinter Scrollbar position, yview_moveto() seems not working

Python Tkinter treeview.heading command not working right in for loop

JTable with horizontal scrollbar

Removing horizontal scrollbar

Treetable with horizontal scrollbar

Add Horizontal Scrollbar for Panel

TOP Ranking

HotTag

Archive