CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

Can't set a placeholder in a CTkEntry when textvariable is enabled

Open Xeway opened this issue 2 years ago • 1 comments

Hey,

I'm facing an issue when using CTkEntry.

size_limit = StringVar()
size_limit.trace_add("write", size_limit_modified)

size_limit_entry = customtkinter.CTkEntry(master=split_tab,
                                          width=200,
                                          textvariable=size_limit,
                                          validate="key",
                                          placeholder_text="1GB = 1000MB = 1000000000B")
size_limit_entry.pack()

On this example, the placeholder doesn't show. If I remove textvariable, it will work.

I don't know if this a bug or a problem in my code.

Thanks for your help.

Xeway avatar Dec 21 '22 13:12 Xeway

same here

djnizzi avatar Dec 22 '22 13:12 djnizzi

Yes is true i'm also facing the same problem though it has been documented that StringVar doesn't work with placeholder_text., i suggest Mr TomSchimansky work on this for us. with my humble request i plead if he can work on this for us

ghost avatar Feb 26 '23 20:02 ghost

Here is a solution that can be used for reference: https://stackoverflow.com/questions/74973450/why-is-the-custom-tkinter-placeholder-text-for-an-entry-box-ignored

shyshu02 avatar Mar 03 '23 03:03 shyshu02