Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustable Frames #2390

Open
sidhantsambyal opened this issue Apr 24, 2024 Discussed in #2389 · 2 comments
Open

Adjustable Frames #2390

sidhantsambyal opened this issue Apr 24, 2024 Discussed in #2389 · 2 comments

Comments

@sidhantsambyal
Copy link

Discussed in #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?

@joocam
Copy link

joocam commented Apr 24, 2024

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

@ashishchib2
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants