问题
Is there any way to make the Tkinter Entry widget so that text can be highlighted and copied, but not changed?
回答1:
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)
来源:https://stackoverflow.com/questions/3680301/make-tkinter-entry-widget-readonly-but-selectable