What can I do to change the bg color of my entry when the state is readonly.
self.v6 =StringVar()
self.txtpic6=Entry(self.root,bg="#cd853f", textvariable=self.v6,state="readonly",justify="center")
self.txtpic6.place(relx=0.87,rely=0.4,relwidth=0.04,relheight=0.06)
In this code, the bg color isn't working.but when I remove the state attribute , the bg color works.
Using readonlybackground
should help. For example:
self.txtpic6=Entry(self.root,bg="#cd853f", textvariable=self.v6,state="readonly",justify="center", readonlybackground='red')
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加