forked from OpenEthan/SMSBoom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smsboom_GUI.py
57 lines (44 loc) · 1.53 KB
/
smsboom_GUI.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from tkinter import Tk, StringVar
from tkinter import ttk
class InputWidget(ttk.Frame):
"""输入框,确认框"""
def __init__(self, parent=None):
ttk.Frame.__init__(self, parent)
self.parent = parent
self.columnconfigure(0, weight=1)
self.rowconfigure(0, weight=1)
self.phone = StringVar()
self.createWidget()
for child in self.winfo_children():
child.grid_configure(padx=5, pady=5)
self.pack()
def createWidget(self):
"""InputWidget"""
ttk.Label(self, text="手机号:").grid(column=0, row=0, sticky='nsew')
ttk.Entry(self, textvariable=self.phone).grid(
column=1, row=0, columnspan=3, sticky='nsew')
ttk.Button(self, text="启动轰炸").grid(
column=4, row=0, sticky='nsew')
class Application(ttk.Frame):
"""APP main frame"""
def __init__(self, parent=None):
ttk.Frame.__init__(self, parent)
self.parent = parent
# 伸缩
self.columnconfigure(0, weight=1)
self.rowconfigure(0, weight=1)
self.createWidget()
# 间隔
for child in self.winfo_children():
child.grid_configure(padx=5, pady=5)
self.pack()
def createWidget(self):
"""Widget"""
input_wiget = InputWidget(self)
if __name__ == "__main__":
root = Tk()
root.title("SMSBoom - 短信轰炸机 ©落落")
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
Application(parent=root)
root.mainloop()