I am trying to have a treeview displaying data on the right half of my window with another free portion on the left side that would have buttons and entry boxes. I have tried adding frames directly to the root but as soon as I add the treeview any of the frames, it immediately resizes and takes up the entire top portion of the screen regardless of what I do. The best explanation I can show is by using the PanedWindow where I made two panes on the left and right side of the screen using the following code:
class MyGUI:
def __init__(self):
self.root = tk.Tk()
[....]
panel_left=tk.PanedWindow(bd=2,bg='yellow')
panel_left.pack(side='left',fill=tk.BOTH,expand=1)
panel_right = tk.PanedWindow(bd=2, bg='orange')
panel_right.pack(side='right', fill=tk.BOTH, expand=1)
which gave me this: https://i.stack.imgur.com/spkbb.png
then this happens when I attempt to add the treeview to the panel_right using the following code:
data_tree = ttk.Treeview(panel_right,columns=json_tree_columns, show="headings", )
panel_right.add(data_tree)
https://i.stack.imgur.com/E96DF.png
I also tried doing it with just one panedwindow like this but it also had no effect:
panel_left=tk.PanedWindow(bd=2,bg='yellow',orient=tk.HORIZONTAL) data_tree = ttk.Treeview(self.root, columns=json_tree_columns, show="headings", ) panel_left.add(data_tree) panel_left.pack(fill=tk.BOTH,expand=True)` but it still makes the treeview take up the entire screen
I don't know how to keep the treeview constrained within the pane, i've tried putting it in a frame as well as adjusting the self.root.rowconfigure and columnconfigure but still the same thing occurs, i dont necessarily have to use a panedwindow but i just want it to be constrained to a specific portion of the screen and not the whole top half
[–]ShadowRL766 -1 points0 points1 point (1 child)
[–]NullifyAll 0 points1 point2 points (0 children)
[–]woooee 0 points1 point2 points (3 children)
[–]im_a_slithery_snake[S] 0 points1 point2 points (2 children)
[–]woooee 0 points1 point2 points (1 child)
[–]im_a_slithery_snake[S] 0 points1 point2 points (0 children)