Issue
Hello I just wanna know if there is any way to see the placeholder_text when the state='readonly'. Because when I give the readonly state I cant see the placeholder_text.
import customtkinter as ctk
gui = Tk()
gui.geometry("200x200")
entrada= ctk.CTkEntry(gui, placeholder_text= 'Hello World', state= 'readonly')
entrada.pack(pady= 50)
gui.mainloop()
Solution
When you set the entry to readonly state initially, the placeholder text cannot be inserted into the entry box.
So you can set the state to readonly after creating the widget, the placeholder text can then be inserted into the entry box:
entrada = ctk.CTkEntry(gui, placeholder_text='Hello World')
entrada.configure(state= 'readonly')
Answered By - acw1668
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.