horizontal scrollbar is not working in Tkinter

i’ve created a program that shows the database content in gui Tkinter.
i can scroll vertically, yet when it come to horizontal scrolling it did not work for example in the image below i can’t scroll to see the rest of groups.
please any help and thank you in advance

class DatabaseViewer:
    def __init__(self, root):
        self.root = root
        self.root.title("Database Viewer")

        # Create Combobox for table selection
        self.label = ttk.Label(self.root, text="Select Table:")
        self.label.pack(pady=10)

        self.table_combobox = ttk.Combobox(self.root)
        self.table_combobox.pack(pady=5)
        self.table_combobox.bind("<<ComboboxSelected>>", self.show_table_data)

        # Create a frame to hold the Treeview and scrollbars
        self.frame = ttk.Frame(self.root)
        self.frame.pack(fill="both", expand=True, padx=10, pady=10)

        # Create the Treeview to display the table data
        self.table_treeview = ttk.Treeview(self.frame, show="headings")
        self.table_treeview.pack(side="left", fill="both", expand=True)

        # Add vertical scrollbar
        self.v_scrollbar = ttk.Scrollbar(self.frame, orient="vertical", command=self.table_treeview.yview)
        self.v_scrollbar.pack(side="right", fill="y")
        self.table_treeview.configure(yscrollcommand=self.v_scrollbar.set)

        # Add horizontal scrollbar
        self.h_scrollbar = ttk.Scrollbar(self.root, orient="horizontal", command=self.table_treeview.xview)
        self.h_scrollbar.pack(fill="x")
        self.table_treeview.configure(xscrollcommand=self.h_scrollbar.set)

        # Load table names into the Combobox
        self.load_table_names()

or many be the problem is here

def show_table_data(self, event):
    # Get the selected table name
    selected_table = self.table_combobox.get()

    # Clear the Treeview
    self.table_treeview.delete(*self.table_treeview.get_children())
    self.table_treeview["columns"] = ()

    # Fetch data from the selected table
    try:
        conn = sqlite3.connect('test.db')
        cursor = conn.cursor()

        # Fetch column names and table data
        cursor.execute(f"PRAGMA table_info({selected_table});")
        columns = [col[1] for col in cursor.fetchall()]

        cursor.execute(f"SELECT * FROM {selected_table};")
        rows = cursor.fetchall()

        # Set columns in Treeview
        self.table_treeview["columns"] = columns
        for col in columns:
            self.table_treeview.heading(col, text=col)
            self.table_treeview.column(col, anchor="center", width=100)

        # Insert rows into the Treeview
        for row in rows:
            self.table_treeview.insert("", "end", values=row)

    except sqlite3.Error as e:
        messagebox.showerror("Error", f"Error fetching table data: {str(e)}")
    finally:
        conn.close()

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật