-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtweet_manager.py
82 lines (59 loc) · 1.56 KB
/
tweet_manager.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
from tkinter import *
# Create the root window
# with specified size and title
root = Tk()
root.title("Root Window")
root.geometry("450x300")
# Create label for root window
label1 = Label(root, text = "This is the root window")
# define a function for 2nd toplevel
# window which is not associated with
# any parent window
def open_Toplevel2():
# Create widget
top2 = Toplevel()
# define title for window
top2.title("Toplevel2")
# specify size
top2.geometry("200x100")
# Create label
label = Label(top2,
text = "This is a Toplevel2 window")
# Create exit button.
button = Button(top2, text = "Exit",
command = top2.destroy)
label.pack()
button.pack()
# Display until closed manually.
top2.mainloop()
# define a function for 1st toplevel
# which is associated with root window.
def open_Toplevel1():
# Create widget
top1 = Toplevel(root)
# Define title for window
top1.title("Toplevel1")
# specify size
top1.geometry("200x200")
# Create label
label = Label(top1,
text = "This is a Toplevel1 window")
# Create Exit button
button1 = Button(top1, text = "Exit",
command = top1.destroy)
# create button to open toplevel2
button2 = Button(top1, text = "open toplevel2",
command = open_Toplevel2)
label.pack()
button2.pack()
button1.pack()
# Display until closed manually
top1.mainloop()
# Create button to open toplevel1
button = Button(root, text = "open toplevel1",
command = open_Toplevel1)
label1.pack()
# position the button
button.place(x = 155, y = 50)
# Display until closed manually
root.mainloop()