开发者

Make Tkinter Entry widget readonly but selectable

开发者 https://www.devze.com 2023-01-15 06:55 出处:网络
Is there any way to make the Tkinter En开发者_Go百科try widget so that text can be highlighted and copied, but not changed? Use the state option \"readonly\":

Is there any way to make the Tkinter En开发者_Go百科try widget so that text can be highlighted and copied, but not changed?


Use the state option "readonly":

state= The entry state: NORMAL, DISABLED, or “readonly” (same as DISABLED, but contents can still be selected and copied). Default is NORMAL. Note that if you set this to DISABLED or “readonly”, calls to insert and delete are ignored. (state/State)

0

精彩评论

暂无评论...
验证码 换一张
取 消