zoukankan      html  css  js  c++  java
  • Python:GUI

    # code: utf-8
    # writer: Geovin Du 涂聚 文
    
    import os;
    import sys;
    from tkinter import *; #GUI  自带的   另有:wxPython,PyQt5,PythonCard,Dabo等
    from tkinter.messagebox import showinfo;
    
    
    
    def reply(name):
        showinfo(title='GUI测试', message='你好! %s!' % name);  
    
    # 应用窗口   
    window=Tk();
    window.title('获取用户输入:涂聚文')  #窗体标题
    #window.iconbitmap('py-blue-trans-out.ico'); #自定义窗体的图标
    
    Label(window,text='输入你的名字:').pack(side=TOP);
    ent=Entry(window);
    ent.pack(side=TOP);
    button=Button(window,text='确定',command=(lambda:reply(ent.get()))); 
    button.pack(side=LEFT);
    window.mainloop();
    

      

  • 相关阅读:
    hdoj:2075
    hdoj:2072
    hdoj:2071
    hdoj:2070
    hdoj:2069
    test001
    hdoj:2067
    hdoj:2061
    hdoj:2058
    hdoj:2057
  • 原文地址:https://www.cnblogs.com/geovindu/p/10939040.html
Copyright © 2011-2022 走看看