有没有办法制作 Tkinter Entry 小部件,以便可以突出显示和复制文本,但不能更改?
最佳答案
使用 state选项“只读”
:
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)
关于python - 使 Tkinter Entry 小部件只读但可选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3680301/