Akascape / CTkTable

Customtkinter Table widget (extension/add-on)
MIT License
265 stars 15 forks source link

Maximun number of rows and scrollable #92

Open LucasRibeiroRJBR opened 4 months ago

LucasRibeiroRJBR commented 4 months ago

Hi. Is there any way to implement a maximum number of rows in the table and, when it passes this maximum limit, makes the table scrollable? In my project, I am returning the number of rows from a database to put in the row parameter of CTkTable, which eventually exceeds the view limit of any monitor.

BP-Feral commented 2 months ago

you have to put your table in a scrollable frame, or load your data in sets of 10 items at a time (similar to pages system)

Akascape commented 2 months ago

@LucasRibeiroRJBR Use the CTkScrollableFrame or my CTkXYFrame

Use pack or grid method only.

BP-Feral commented 2 months ago

I just read the len() of my data, and if its bellow a treshold, i manually set the table to row=10, if it's above the threshold, i change the frame to a scrollable frame and pack the table in with the new total len(). this way the table will always be 10 rows, or max len of my data.

LucasRibeiroRJBR commented 2 months ago

Thank you for advices @BP-Feral and @Akascape . @Akascape , do you have plans to unit all your personalized CTks projects into a single package?