Skip to content

loading time in a large number of records #89

Answered by Akascape
Nigacatch asked this question in Q&A
Discussion options

You must be logged in to vote

Here is an example for the page implementation in ctktable,

import customtkinter
from CTkTable import *

def change_left():
    global current_page
    current_page -= 4 # move 4 rows backward
    table.update_values(values[current_page-4:current_page])
    pass

def change_right():
    global current_page
    current_page += 4 # move 4 rows forward
    table.update_values(values[current_page-4:current_page])
    pass

root = customtkinter.CTk()

current_page = 0

# Make a long list
values = []
start = 0
end = 5

for i in range(20):
    values.append(list(range(start, end)))
    start = end
    end += 5
    

table = CTkTable(master=root, row=4, column=5)
table.pack(expand=True, fill="both"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nigacatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
information Related to docs
2 participants
Converted from issue

This discussion was converted from issue #88 on April 17, 2024 11:19.