CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

Adjustable Frames

Open sidhantsambyal opened this issue 10 months ago • 2 comments

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?

sidhantsambyal avatar Apr 24 '24 12:04 sidhantsambyal

Can you send me the code? It would be easier to understand your needs.

joocam avatar Apr 24 '24 16:04 joocam

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

ashishchib2 avatar Apr 29 '24 05:04 ashishchib2