CustomTkinter
CustomTkinter copied to clipboard
Adjustable Frames
Discussed in https://github.com/TomSchimansky/CustomTkinter/discussions/2389
Originally posted by sidhantsambyal April 24, 2024 I have 2 frame : left and right but left has tree and the content sometime is big that it hides behind the right frame, Is there a way to make frame adjustible according to users need?
Can you send me the code? It would be easier to understand your needs.
Creating Left Frame
left_frame = CheckboxTreeview(app)
y_scrollbar = tk.Scrollbar(left_frame, orient="vertical", command=left_frame.yview)
y_scrollbar.pack(side=ctk.RIGHT, fill=ctk.Y)
# x_scrollbar = tk.Scrollbar(left_frame, orient="horizontal", command=left_frame.xview)
# x_scrollbar.pack(side=ctk.BOTTOM, fill=ctk.X)
base_xml_file_path = utils.get_base_xml_path()
tree = utils.parse_xml_file(base_xml_file_path)
root_element = tree.getroot()
build_tree(left_frame, "", root_element)
left_frame.pack(side=ctk.LEFT, fill=ctk.BOTH, expand=True)
# -------------------------------------------------
# Creating Right Frame
right_frame = ctk.CTkFrame(app, border_width=0, bg_color="#F2F2F2")
# -------------------------------------------------
# Right Top Frame
right_top_frame = ctk.CTkFrame(right_frame, bg_color="#F2F2F2", border_width=0)
When the content in Xml is too big, the content is hidden behind the right frame. So can user drag the frame to adjust the frames according to the need