-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.py
More file actions
34 lines (25 loc) · 910 Bytes
/
gui.py
File metadata and controls
34 lines (25 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from tkinter import *
import tkinter.messagebox as messagebox
class Application(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.createWidgets()
def createWidgets(self):
self.helloLabel = Label(self, text='请输入验证码:')
self.helloLabel.pack(side=LEFT)
e=StringVar()
self.Input = Entry(self,textvariable=e)
self.Input.pack(side=LEFT)
e.set('input your test here')
# self.confirmButton = Button(self,test='Confirm',command=self.quit)
# self.confirmButton.pack()
self.ConfirmButton = Button(self, text='Confirm', command=self.hello)
self.ConfirmButton.pack(side=LEFT)
def hello(self):
name = self.Input.get()
# messagebox.showinfo('Message',name)
return name
app=Application()
app.master.title('验证码:')
app.mainloop()