我正在尝试做一些“游戏”之类的Text Adventure,并且我正在使用文本小部件来显示文本。当我的光标悬停在文本窗口小部件上时,它变为I型光标,可能是因为它想要选择它。该小部件已禁用,并且标记已关闭。
如何关闭I型光束光标以获得更愉悦的体验?
window=Tk()
window.resizable(width=False, height=False)
window.title("Text Adventure")
txt=Text(window, font=("Comic Sans", 44), bg="Black", fg="white", width=width-100, borderwidth=0, wrap=WORD, exportselection=0)
txt.tag_configure('center', justify='center')
txt.insert('end', text, 'center')
txt.config(state=DISABLED)
txt.pack()
answer=Entry(window, font=("Comic Sans", 20), bg="Black", fg="Red", borderwidth=0, disabledbackground="Black", disabledforeground="Red", exportselection=0)
answer.place(x=(width/2)-ewidth/2, width=ewidth, height=eheight, y=height-eheight*8)
txt.bindtags((str(txt), str(window), "all"))
answer.bindtags((str(answer), str(window), "all"))