-
Notifications
You must be signed in to change notification settings - Fork 47
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
Resize sheet when user resize window #11
Comments
I think there are a few possible solutions, I'll start with the easiest If you have put the self.my_frame_name.grid_columnconfigure(<integer column that the Sheet() was put in>, weight = 1)
self.my_frame_name.grid_rowconfigure(<integer row that the Sheet() was put in>, weight = 1) and don't forget to use Or if you used Try the above methods on other parent container frames as well and if you have set a specific width and height for the I have also written some example code based on your image that might help, it seems to do what you want and might highlight what you need to change, but I'm not 100% sure it's applicable, give it a try: from tksheet import Sheet
import tkinter as tk
app = tk.Tk()
app.grid_columnconfigure(0, weight = 1)
app.grid_rowconfigure(0, weight = 1)
main_frame = tk.Frame(app)
main_frame.grid(row = 0, column = 0, sticky = "nsew", padx = 10, pady = 10)
entry = tk.Entry(main_frame)
entry.grid(row = 0, column = 0, sticky = "ew", padx = 10, pady = 10)
main_frame.grid_columnconfigure(0, weight = 1)
main_frame.grid_rowconfigure(1, weight = 1)
sheet = Sheet(main_frame,
total_rows = 1200,
total_columns = 30)
sheet.grid(row = 1, column = 0, sticky = "nswe", padx = 10, pady = 10)
app.mainloop() If these don't work or are not applicable let me know and I could get into |
@ragardner your are savior, that worked ! |
Hello @ragardner, have a good day.
I have a question, can we resize the sheet widget when I resize the main window so I can see horizontal + vertical scrollbar of the sheet ?
Currently, this is what I get when I downsize the main window
Thanks and best regards,
longk15t
The text was updated successfully, but these errors were encountered: