I want to add a horizontal scroll bar to the particular tree-view table since I have not used Tkinter before so please help!
import tkinter
def __create_tree_view(self):
""" Creates a TreeView Layout with req Headers """
style = it.Style()
style.configure("Custom.Treeview.Heading",foreground="green", relief="flat")
style.map("Custom.Treeview.Heading", relief=[('active','groove'),('pressed','sunken')])
style.configure('Treeview', rowheight=20)
#
self.tree_view = ttk.Treeview(self.right_frame, selectmode ='browse',\
style="Custom.Treeview")
self.tree_view.grid(row=1, column=1, sticky=tk.NSEW)
self.verticalscrollba = ttk.Scrollbar(self.right_frame, orient="vertical", \
command=self.tree_view.view)
self. verticalscrollbar.grid(row=1,column=1,sticky='nse')
self.tree_view.configure(yscrollcommand = self.verscrlbar.set)
# Defining number of columns
self.tree_view["columns"] = ("1", "2", "3", "4")
# Defining heading
self.tree_view['show'] = 'headings'
# Assigning the width and anchor to the respective columns
self.tree_view.column("1", width = int(self.window_width/5), anchor ='ca, stretch=False)
self.tree_view.column("2", width = int(self.window_width/4)-30, anchor ='ca, stretch=False)
self.tree_view.column("3", width = int(self.window_width/6)-30, anchor ='ca, stretch=False)
self.tree_view.column("4", width = int(self.window_width/3), anchor ='ca, stretch=False)
# Assigning the heading names to the respective columns
self.tree_view.heading("1", text ="Brand/Model/Type")
self.tree_view.heading("2", text ="Device_Id")
self.tree_view.heading("3", text ="Device_Ip")
self.tree_view.heading("4", text ="GUID")
where the brand is the brand of the device IP, is IP address and so here in this code how to add a horizontal scroll bar without overwriting the last line of the treeview table I tried to add the scrollbar but it's displaying on the last row of the table it should display below the last row of the table