Open frankm1870 opened 2 years ago
After reading some of the other question, it looks like this would be very similar to the combo and text box. (in the fact you would need to deal with the scrolling) Hopefully if you figure it out for one it might work for all. Thanks for your effort this one of the best (if only) enhancements for tkinter (besides ttk).
Hi, first I will do Menu, ComboBox/MenuBox and TextBox. But after this I will focus on ListBox and Tables in general.
Hi Tom,
While looking at the ListBox, could you then also add the ScrollBar functionality as default, just like you did to the TextBox. Please...
Any updates?
CTkScrollabelFrame is now implemented and if you have a look at: https://github.com/TomSchimansky/CustomTkinter/blob/master/examples/scrollable_frame_example.py You can implement all kind of listboxes now, with some performance limitations if there are too many elements. But I will also add a lazy CTkListbox which will handle more items than a scrollable frame.
would be cool to get listbox. tried to add textboxes to scrollframes, but its not possible to mark multiple rows.
mod of scrollable_frame_example.py
Hi @TomSchimansky
I am wondering if we have the widget for the combobox to be multiselection? My app needs that eagerly.
Let me know if you have any clue on that one.
Thanks!
@TomSchimansky >
It works wonders, but the destroy() method does not work on these, however place_forget() works 100s
Hi @TomSchimansky Although CTkScrollabelFrame was implemented as an alternative to Listbox, users cannot use the cursor or shift/ctrl keys to select multiple items as they can with Listbox's MULTIPLE or EXTENDED selectmode. I would like to ask if you have any plans to implement similar functionality in ScrollabelFrame or Tables, if not, I will need to start implementing my own version.
@frankm1870 I made this custom listbox for customtkinter: https://github.com/Akascape/CTkListbox
I tried your CTkListbox. I like the looks off it but it is really slow when i use it with a sql query compared to the tk.listbox. do any one have any performance experience with the ctklistbox?
Any update on CTk Listbox? I'm using tkinters listbox within CTKScrollableFrame at the moment, but when open the app on my monitor the scaling is all off on the listbox.
@03bennet https://github.com/Akascape/CTkListbox
Thanks @Akascape. I did try this. Looks great, but I have about 1500 entries into this listbox with a search bar to parse. The Listbox seems to have performance issues when used in this way. Any idea on how to mitigate the performance issues?
@03bennet 1500 entries? That's a lot. Use the tkinter listbox with color customisation to match the ctk theme. That's what I would recommend. Moreover, even any other custom made widget will lag with so much widget data.
Ha yeah. They are epsg coordinate systems and there are loads!
This is what I’ve done, which looks decent and has no performance issues. However now I have some scaling issues when moving from laptop to monitor. Only on the tkinter listbox. All custom tkinter widgets and the CTkListbox scale fine.
@03bennet
However now I have some scaling issues when moving from laptop to monitor
You can fix this by using self._apply_widget_scaling(value)
method where value can be the width/height of the listbox.
Second method is to disable the scaling using
ctypes.windll.shcore.SetProcessDpiAwareness(0)
but this will only work in windows and makes widget a little blurry on the edges, which is not a big issue but it can fix all the scaling problems.
Thanks @Akascape I tried the second method and it works great
@Akascape the problem why it's so slow is, that you're insert the objects one by one in a for loop. So the user can code the most efficient code, but it helps nothing because you're using this slow for loop. I already tried to insert round 300-400 items into the list, with a prefilled [list] and there was the speed problem exactly shown -> one by one and in the end very slow. We have to switch now back to the Tkinter Listbox with our project, if the speed problem will be not solved, although we really like your work.
Greets :)
@03bennet https://github.com/Akascape/CTkListbox
It doesn't work with .destroy()
Hi! Even I'm facing the performance issues due to a large number of entries. Is there any solution for this?
Hey Tom
Will you add listboxes ?