tkinter里insert不能用

AttributeError: 'NoneType' object has no attribute 'insert'

不知道你这个问题是否已经解决, 如果还没有解决的话:
  • 你可以参考下这个问题的回答, 看看是否对你有帮助, 链接: https://ask.csdn.net/questions/7627213
  • 这篇博客也不错, 你可以看下python多线程处理tkinter用户操作的后台事件,解决tkinter界面卡死无响应的问题
  • 除此之外, 这篇博客: Python tkinter Entry 属性和方法介绍中的 1.1标准属性 部分也许能够解决你的问题, 你可以仔细阅读以下内容或者直接跳转源博客中阅读:
            background, bd, bg, borderwidth, cursor,
            exportselection, fg, font, foreground, highlightbackground,
            highlightcolor, highlightthickness, insertbackground,
            insertborderwidth, insertofftime, insertontime, insertwidth,
            invalidcommand, invcmd, justify, relief, selectbackground,
            selectborderwidth, selectforeground, show, state, takefocus,
            textvariable, validate, validatecommand, vcmd, width,
            xscrollcommand
    

    以上属性来自于python tkinter的__init__文件。感兴趣的读者可以打开查看。


如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^