How to change text cursor color in Tkinter?

谁说我不能喝 提交于 2019-12-04 17:25:59

问题


I have a text widget with dark background and I can't see the cursor's position. Is there any way to change the (blinking) text cursor's color?


回答1:


You can change the insertbackground option of the text widget to whatever you want.




回答2:


Option for text cursor color in Tk is -insertbackground.

textWidget.config(insertbackground=...)


来源:https://stackoverflow.com/questions/14284492/how-to-change-text-cursor-color-in-tkinter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!