A better scrollable frame for customtkinter.
License: MIT License
I've looked through the CTkScrollableFrame and the CTkScrollbar, but I can't figure out how to interact with CTkXYFrame scrollbars... I'd like to make them 'fatter' so that they are easier to see.
I see how to change their color, but that won't be enough to make them more accessible.
Thank you
i have kept the main file in proper destination but it is still showing module not found
As seen in the screenshot, the CTkXYFrame
does not change to light mode properly. If we determine this is an issue with CustomTkinter, I will transfer the issue.
The code for the usage of this extension can be found here.
import customtkinter as ctk
from CTkXYFrame import CTkXYFrame
def dark_mode(*args):
ctk.set_appearance_mode("dark")
def light_mode(*args):
ctk.set_appearance_mode("light")
app = ctk.CTk()
app.geometry("700x600")
frame = CTkXYFrame(master = app)
frame.grid(row = 0, column = 0, sticky = "nsew")
label = ctk.CTkLabe(master = frame, text = "label")
label.grid(row = 0, column = 0, sticky = "nsew")
button = ctk.CTkButton(master = frame, text = "button")
button.grid(row = 1, column = 0, sticky = "nsew")
app.bind("d", dark_mode)
app.bind("l", light_mode)
app.mainloop()
macOS 12.6.7
Python 3.11.4
CustomTkinter 5.2.0
CTkXYFrame unsure
Why you didn't upload this package on PyPI just like you did with others.
Hello (:
If you take your example_1.py and try to execute the code with CTkOptionMenu instead of CTkButton you get an infinite recursion error in the terminal that doesn't end.
There is also no further information given by the traceback than "Exception in Tkinter callback"
I tried to fix this without any luck, maybe someone else will be able to.
Here is the code if someone wants to try it out:
`
import customtkinter
from CTkXYFrame import *
root = customtkinter.CTk()
xy_frame = CTkXYFrame(root)
xy_frame.pack(fill="both", expand=True, padx=10, pady=10)
for i in range(20):
for j in range(10):
customtkinter.CTkOptionMenu(xy_frame).grid(row=i, column=j, padx=5, pady=5)
root.mainloop()
`
Good Luck!
Viktor
frame = CTkXYFrame(root, width=1000)
frame.grid(row=1, column=1)
studentsTable = CTkTable(frame, values=studentsTableList)
studentsTable.grid(row=1, column=1)
marksTable = CTkTable(frame, values=marksTableList, write=1)
marksTable.grid(row = 1, column=2)
I have a problem, the application does not start. When I use CtkScrollableFrame, everything works
Hi @Akascape
I tried the place
instead of pack
but its not working
Here is the code I tried.
frm_cscan_widgets = CTkXYFrame(master=root, width=200, height=150)
frm_cscan_widgets.place(x=10, y=140)
I see the width, height isn't working. Here is the screenshot
https://i.imgur.com/CJ5s6no.png
Any help would be appreciated.
I'm still quite new to python so sorry if there is a simple fix for this.
Code:
from tkinter import *
import customtkinter, math
from CTkXYFrame import *
from CTkTable import *
customtkinter.set_appearance_mode("System") # Modes: "System" (standard), "Dark", "Light"
customtkinter.set_default_color_theme("green") # Themes: "blue" (standard), "green", "dark-blue"
app = customtkinter.CTk()
app.geometry(f"{1600}x{900}") # configure window
app.title("CustomTkinter simple_example.py")
xy_frame = CTkXYFrame(app, width=1200, height=1200) # <-----
xy_frame.grid(row=1, column=5, columnspan=40, padx=10, pady=10, sticky = "nsew")
table = CTkTable(xy_frame, row=7, column=10, values="")
table.grid(row=1, column=5, columnspan=40, padx=10, pady=10, sticky = "nsew")
Issue:
I tried to change the width and height but the size still doesn't change from its default value. The same method works perfectly for CTkControllableFrame which is supposed to have the same methods and arguments as CTkXYFrame so I was wondering if I'm missing something
Hi @Akascape I am Using CTkXYFrame inside CTkScrollableFrame and when I am scrolling the CTkXYFrame it is working normally but when I am scrolling the CTkScrollableFrame the CTkXYFrame is automatically scrolling with it.
Video 👇👇👇👇
Hoping that you fix this soon.......
Hi, I have multiple tables on my UI and the size of the table is all different. Does anyone know how to use the scrollable frame ONLY when the table can't "fit" in the original frame? I'm using the Table widget you created btw!
table = CTkXYFrame(master=app)
table.pack(expand=True, fill="both", padx=10, pady=(100, 0))
ctk_table = CTkTable(table, row=20, column=1,
values=value, font=LABEL_FONT, anchor='w')
I have one column here which i expected it to span the entire row
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.