zoukankan      html  css  js  c++  java
  • py库: GUI(tkinter)

    图形用户界面(Graphical User Interface,简称 GUI)

    http://www.runoob.com/python/python-gui-tkinter.html  Python GUI编程(Tkinter) —— 菜鸟教程

    随便看看:

    http://www.cnblogs.com/joechinochl/articles/7485709.html  八款常用的 Python GUI 开发框架

    http://www.cnblogs.com/monsteryang/p/6558693.html  python GUI编程(Tkinter)

    http://www.cnblogs.com/monsteryang/p/6558904.html  简单的python GUI例子


    注意:Python3.x 版本使用的库名为 tkinter,即首写字母 T 为小写。

    import tkinter

    例子1:

    from tkinter import *
    
    def on_click():
        label['text'] = text.get()
    
    root = Tk(className='hello')
    root.minsize(600, 400)
    
    label = Label(root, text="your message")
    label.pack()
    
    text = StringVar()
    text.set('请输入:')
    entry = Entry(root)
    entry['textvariable'] = text
    entry.pack()
    
    frame = Frame(root)
    frame.pack()
    Button(frame, text="QUIT", fg="red", command=frame.quit).pack(side=RIGHT)
    Button(frame, text="change", fg="blue", command=on_click).pack(side=LEFT)
    
    root.mainloop()

    ...

  • 相关阅读:
    BluetoothGetRadioInfo 函数
    BluetoothFindRadioClose 函数
    BluetoothFindNextRadio 函数
    BluetoothFindFirstRadio 函数
    BLUETOOTH_DEVICE_INFO 函数
    BluetoothSetServiceState 函数
    Bluetooth Functions
    union联合体学习
    置顶
    Toppo: 1
  • 原文地址:https://www.cnblogs.com/qq21270/p/7990287.html
Copyright © 2011-2022 走看看