Open ItsMichaelll opened 2 months ago
It doesn't work instancing the class with font parameter, but it works if assigned after with the font property : Example: ` custom_font =("Arial",11) self.listBoxAnnoTarget = CTkListbox(self.targetoptselection_frame, multiple_selection=False, command=self.filter_ui, font=custom_font) #NO CHANGE
self.listBoxAnnoTarget = CTkListbox(self.targetoptselection_frame, multiple_selection=False, command=self.filter_ui) self.listBoxAnnoTarget.font=custom_font #THIS WORKS ` This is the workaround I used.
I wanted to change the font of the buttons inserted into the CTkListbox, so I used the 'font' parameter, but it wasn't changing the font of the buttons.
Here's my initialization of the CTkListbox:
I discovered a temporary fix for myself by modifying your ctk_listbox.py file, particularly the 'insert' method in line 198. I did have to add the import line
import ast
to the top of your ctk_listbox.py file for my fix, though.'ctk_listbox.py' (line 198):
I'm hoping there is a better fix for this? Let me know, and if you're having trouble reproducing it I can provide more of my code.