-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathText_app3.py
39 lines (34 loc) · 1.04 KB
/
Text_app3.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
import tkinter
class Application(tkinter.Frame):
def __init__ (self,master):
tkinter.Frame.__init__(self,master)
self.pack()
self.CreateWidgets()
def CreateWidgets(self):
self.textbox1=tkinter.Text()
self.textbox1.pack()
self.button1=tkinter.Button()
self.button1["command"]=self.button1_click
self.button1["text"]="click"
self.button1.pack()
self.button2=tkinter.Button()
self.button2["command"]=self.button1_save
self.button2["text"]="save"
self.button2.pack()
self.button3=tkinter.Button()
self.button3["command"]=self.button1_load
self.button3["text"]="load"
self.button3.pack()
def button1_click(self):
text=self.textbox1.get(0.0,tkinter.END)
print(text.upper())
print(text.lower())
print(text.title())
def button1_save(self):
pass
def button1_load(self):
pass
root=tkinter.Tk()
app=Application(master=root)
app.mainloop()
root.destroy()