•        Python : 3.7.0
  •          OS : Ubuntu 18.04.1 LTS
  •         IDE : PyCharm 2018.2.4
  •       Conda : 4.5.11
  •    typesetting : Markdown

code

"""
@Author : 行初心
@Date : 18-10-1
@Blog : www.cnblogs.com/xingchuxin
@Gitee : gitee.com/zhichengjiu
"""
from tkinter import * def main():
root = Tk() content = StringVar()
content.set('可以选中的伏牛花') e = Entry(root,
textvariable=content,
state='readonly',
)
e.pack(padx=10, pady=10) mainloop() if __name__ == '__main__':
main()

result

细心观察,拿出取色器看看背景色,文字处于选中状态的

reference

  • [文档] docs.python.org/3/library/tkinter.html

resource

  • [文档] docs.python.org/3
  • [规范] www.python.org/dev/peps/pep-0008
  • [规范] zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/python_language_rules
  • [源码] www.python.org/downloads/source
  • [ PEP ] www.python.org/dev/peps
  • [平台] www.cnblogs.com
  • [平台] gitee.com


Python具有开源、跨平台、解释型和交互式等特性,值得学习。

Python的设计哲学:优雅,明确,简单。提倡用一种方法,最好是只有一种方法来做一件事。

GUI可以选择PyQt5、PySide2、wxPython、PyGObject、wxWidgets等进行创作。

代码的书写要遵守规范,这样有助于沟通和理解。

每种语言都有独特的思想,初学者需要转变思维、踏实践行、坚持积累。

Python3 tkinter基础 Entry state 不可写 可以选 可复制的输入框的更多相关文章

  1. Python3 tkinter基础 Entry state 不可写 不可选 不可复制的输入框

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  2. Python3 tkinter基础 Entry validatecommand 获取输入框的值

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  3. Python3 tkinter基础 Entry validate validatecommand 失去焦点时,检查输入内容

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  4. Python3 tkinter基础 Entry validate isdigit 只能输入数字的输入框

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  5. Python3 tkinter基础 Entry show textvariable 密码输入框

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  6. Python3 tkinter基础 Entry insert delete 点击按钮 向输入框赋值 或 清空

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  7. Python3 tkinter基础 Entry get 点击按钮 将输入框中文字输出到控制台

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  8. Python3 tkinter基础 Checkbutton variable 多选钮是否被选中

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  9. Python3 tkinter基础 LabelFrame StringVar 单击按钮,Label中显示的文字更换

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

随机推荐

  1. MyBatis基础入门《十 一》修改数据

    MyBatis基础入门<十 一>修改数据 实体类: 接口类: xml文件: 测试类: 测试结果: 数据库: 如有问题,欢迎纠正!!! 如有转载,请标明源处:https://www.cnbl ...

  2. struts2启动时,出现的com.opensymphony.xwork2.util.finder.ClassFinder - Unable to read class 错误解决办法

    在项目的struts.xml文件中第一行加入<constant name="struts.convention.package.locators" value="c ...

  3. <meta>标签中,X-UA-Compatible和IE=Edge,chrome=1的作用

    用来指定浏览器优先以什么模式来渲染页面,ie=edge表示以最高版本内核渲染,ie=8表示以id8内核渲染页面,此外还有ie=9.id=10等. 而chrome=1意思是,优先以chrome内核来渲染 ...

  4. python 将word另存为txt

      import os import os.path from win32com import client as wc c=[] rootdir=["d:/77"] #以该路径为 ...

  5. steam pipeGUI

    SteamPipe GUI 工具 如果您运行的是 Windows,并且更喜欢使用 GUI 工具来帮助生成配置文件并上传您的生成版本,您可以使用 Steamworks SDK 的工具文件夹中的 Stea ...

  6. HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor

    看到的最长的类名: HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhere ...

  7. maven编译不通过:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存在

     问题:代码中使用了sun公司的第三方私有库,导致编译不通过 maven打包异常:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存 ...

  8. Axis2基础

    本章主要介绍如何使用axis2开发webservice接口. 以下以一个实例程序讲解如何编写一个axis2的服务端和客户端. axis2版本:axis2-1.5.4-bin.zip 目录结构: 关键代 ...

  9. L1正则和L2正则的比较分析详解

    原文链接:https://blog.csdn.net/w5688414/article/details/78046960 范数(norm) 数学上,范数是一个向量空间或矩阵上所有向量的长度和大小的求和 ...

  10. Porsche Piwis Tester 2 Online Coding Guide

    Porsche Piwis online programming account service is piwis porsche subscription and piwis tester 2 on ...