Open YoussefEssalhi opened 1 year ago
The error explains itself...
It's not a supported argument. You could ask for this argument to be added in a feature request. However, @TomSchimansky would've left this out for a good reason, perhaps it's not possible with the way CustomTkinter renders widgets.
I'd suggest closing this as "not planned" (gray circle).
@YoussefEssalhi have you tried doing this?
import customtkinter as CTK
root = CTK.CTk()
root.geometry("250x150")
entry = CTK.CTkEntry(root)
entry._entry.configure(selectbackground="red") #right here
entry.pack(pady=15)
root.mainloop()
I would like to point out that while @loafthecomputerphile's workaround works. It's not recommended to edit the _entry
attribute as it's not intended for users. This was probably done on purpose as the selectbackground
attribute may have unintended consequences. Furthermore, _entry
is probably the tkinter
backend widget which is why the selectbackground
attribute works.
@dishb I don't think it was done on purpose, I think it was forgotten and should be fixed.
By the way, They give me the same solution of @loafthecomputerphile for another problem, Dishb I hope you will take a look at:
Normal TK :
https://github.com/TomSchimansky/CustomTkinter/assets/76540840/b09d9a3c-448b-40c0-a500-d964a82a569b
CustomTkinter :
ValueError: ['selectbackground'] are not supported arguments. Look at the documentation for supported arguments.
.