0
1
00:00:05,064 --> 00:00:05,897
<v Volkan>Hello again.</v>
1

2
00:00:05,897 --> 00:00:08,050
In this lesson, we are going to finish our project.
2

3
00:00:08,050 --> 00:00:11,050
And we are going to create this About Us page.
3

4
00:00:11,050 --> 00:00:12,030
Today, what I want to do,
4

5
00:00:12,030 --> 00:00:14,380
I want to create a new Python file, okay.
5

6
00:00:14,380 --> 00:00:16,450
I will create, of course, we don't need to create
6

7
00:00:16,450 --> 00:00:19,310
but I want to create a new Python file.
7

8
00:00:19,310 --> 00:00:21,440
Of course, we can also create a new class
8

9
00:00:21,440 --> 00:00:25,880
and show it, show our, display our About Us page.
9

10
00:00:25,880 --> 00:00:28,410
But instead of class,
10

11
00:00:28,410 --> 00:00:31,790
I want to create a new Python file, okay.
11

12
00:00:31,790 --> 00:00:34,480
Here, I will say Address Book APP, and New.
12

13
00:00:34,480 --> 00:00:37,100
Here it will be Python File.
13

14
00:00:37,100 --> 00:00:39,700
And let's say about, okay.
14

15
00:00:39,700 --> 00:00:41,247
And after that, what I want to do here,
15

16
00:00:41,247 --> 00:00:44,370
I need to create a new class, right.
16

17
00:00:44,370 --> 00:00:47,900
But remember, I also I told you
17

18
00:00:47,900 --> 00:00:49,942
about how we can make connection
18

19
00:00:49,942 --> 00:00:51,410
between Python files, right.
19

20
00:00:51,410 --> 00:00:52,812
I showed you the first way,
20

21
00:00:52,812 --> 00:00:55,407
and I also recommend this way, okay.
21

22
00:00:55,407 --> 00:00:57,204
Now in this, for this file,
22

23
00:00:57,204 --> 00:00:58,983
I will show you the other way, okay,
23

24
00:00:58,983 --> 00:01:03,020
how we can make connection between our files.
24

25
00:01:03,020 --> 00:01:08,020
Here, by the way, here what I need to do,
25

26
00:01:08,140 --> 00:01:11,850
firstly, I need to go to main.py.
26

27
00:01:11,850 --> 00:01:14,780
And here, I will say about okay,
27

28
00:01:14,780 --> 00:01:16,640
I need to import it first.
28

29
00:01:16,640 --> 00:01:20,290
And here, I will not inherit my about.py, okay.
29

30
00:01:20,290 --> 00:01:23,220
Because I'm using the, I will use the second way.
30

31
00:01:23,220 --> 00:01:27,693
So I will say from Tkinter import *, okay.
31

32
00:01:28,610 --> 00:01:33,610
And after that here, class and say About, okay.
32

33
00:01:36,090 --> 00:01:39,340
And here, as I said, I will not inherit my class.
33

34
00:01:39,340 --> 00:01:43,523
And I will say only def init and self.
34

35
00:01:45,720 --> 00:01:48,693
And second parameter will be a root, okay.
35

36
00:01:50,850 --> 00:01:52,220
And after that, what I need to do,
36

37
00:01:52,220 --> 00:01:57,220
I need to say self.root is equal to root, okay.
37

38
00:01:58,860 --> 00:02:01,980
And now, like before, main.py, okay.
38

39
00:02:01,980 --> 00:02:03,010
Remember it.
39

40
00:02:03,010 --> 00:02:05,300
What we were using, we were,
40

41
00:02:05,300 --> 00:02:09,810
here we're going to create a new main function
41

42
00:02:10,960 --> 00:02:15,960
for our page, okay.
42

43
00:02:16,100 --> 00:02:17,760
And here, what I will say,
43

44
00:02:17,760 --> 00:02:22,760
I will say def main, okay.
44

45
00:02:23,140 --> 00:02:25,450
And here, like before, I will say
45

46
00:02:25,450 --> 00:02:29,253
root is equal to Tk,
46

47
00:02:30,600 --> 00:02:35,600
and our app is equals to application,
47

48
00:02:36,610 --> 00:02:38,733
not application, this is About right.
48

49
00:02:40,570 --> 00:02:43,300
And About, and here I will say root.
49

50
00:02:45,510 --> 00:02:49,613
And root.title.
50

51
00:02:52,680 --> 00:02:55,460
About us, let's say.
51

52
00:02:55,460 --> 00:02:58,173
And after that root.geometry,
52

53
00:02:59,850 --> 00:03:04,850
I'll say 550 by 550 plus again,
53

54
00:03:06,250 --> 00:03:11,230
550, sorry, plus, plus again
54

55
00:03:12,930 --> 00:03:17,333
must be here, 550 and plus 200, okay.
55

56
00:03:18,440 --> 00:03:20,780
And after that, what I will say,
56

57
00:03:20,780 --> 00:03:22,180
similar things actually.
57

58
00:03:22,180 --> 00:03:24,130
Like resizable, we can use also
58

59
00:03:24,130 --> 00:03:28,337
root.resizable False and False.
59

60
00:03:31,570 --> 00:03:33,263
And root.mainloop, all right.
60

61
00:03:39,880 --> 00:03:41,960
And here, I'll say
61

62
00:03:41,960 --> 00:03:46,540
if __name__
62

63
00:03:47,530 --> 00:03:52,140
equals equals quotes, single quotes,
63

64
00:03:52,140 --> 00:03:53,610
and here, __main,
64

65
00:03:55,600 --> 00:03:57,740
and again __ okay.
65

66
00:03:57,740 --> 00:03:59,860
So if it's like that,
66

67
00:03:59,860 --> 00:04:02,083
call my function, main function, all right.
67

68
00:04:03,400 --> 00:04:06,640
And now, as you know, if I run this application
68

69
00:04:06,640 --> 00:04:08,650
individually like not from main,
69

70
00:04:08,650 --> 00:04:10,960
I can see my window.
70

71
00:04:10,960 --> 00:04:12,803
You see our window is here.
71

72
00:04:13,710 --> 00:04:15,120
And if you want to
72

73
00:04:16,650 --> 00:04:17,840
what we are going to do here,
73

74
00:04:17,840 --> 00:04:19,785
actually let's do it,
74

75
00:04:19,785 --> 00:04:21,867
we are going to show a message to users,
75

76
00:04:21,867 --> 00:04:23,850
the About Us message, right.
76

77
00:04:23,850 --> 00:04:25,560
to do that, what I need to do,
77

78
00:04:25,560 --> 00:04:28,280
here I will create only a frame, okay.
78

79
00:04:28,280 --> 00:04:30,890
And one label, that's all , it's enough.
79

80
00:04:30,890 --> 00:04:33,420
Frame is equal to Frame constructor method,
80

81
00:04:33,420 --> 00:04:35,376
and here I will say root.
81

82
00:04:35,376 --> 00:04:39,963
And after that, background color will be ffa500, okay.
82

83
00:04:46,720 --> 00:04:50,073
And the width, width is equal to 550,
83

84
00:04:55,470 --> 00:04:57,823
and height also will be 550.
84

85
00:05:02,100 --> 00:05:06,150
After that, I can use the Geometry Manager frame dot,
85

86
00:05:06,150 --> 00:05:07,093
let's use pack.
86

87
00:05:08,270 --> 00:05:10,430
And again, I will say fill this time.
87

88
00:05:10,430 --> 00:05:13,483
I will say fill BOTH, okay, fill BOTH.
88

89
00:05:14,570 --> 00:05:17,050
And after that, let's create our text,
89

90
00:05:17,050 --> 00:05:20,453
text is equal to a Label.
90

91
00:05:22,510 --> 00:05:26,360
And here its master will be frame right.
91

92
00:05:26,360 --> 00:05:28,183
And after that, text will be,
92

93
00:05:30,140 --> 00:05:31,750
let's say something like
93

94
00:05:31,750 --> 00:05:35,020
this is our About Us page, okay,
94

95
00:05:37,270 --> 00:05:40,400
you can find more.
95

96
00:05:40,400 --> 00:05:44,500
And now if I want to create a new line here,
96

97
00:05:44,500 --> 00:05:47,250
what I will say here, let's press this one.
97

98
00:05:47,250 --> 00:05:50,500
Okay, and after that, \n, okay,
98

99
00:05:50,500 --> 00:05:54,523
and information about,
99

100
00:05:56,781 --> 00:05:58,220
this is our About Us page,
100

101
00:05:58,220 --> 00:06:01,600
you can find more information about us here.
101

102
00:06:01,600 --> 00:06:06,110
And again, Enter, and here, \n again,
102

103
00:06:06,110 --> 00:06:09,400
this application was created
103

104
00:06:14,360 --> 00:06:18,653
for educational purposes.
104

105
00:06:24,884 --> 00:06:25,717
Purposes.
105

106
00:06:27,573 --> 00:06:31,290
Okay again, and now here backslash again.
106

107
00:06:31,290 --> 00:06:36,290
And here I will say, and we have learned,
107

108
00:06:43,020 --> 00:06:45,160
learned a lot, okay.
108

109
00:06:45,160 --> 00:06:47,780
Something like that, this is our message,
109

110
00:06:47,780 --> 00:06:49,110
or something like that.
110

111
00:06:49,110 --> 00:06:51,787
And now, if I run my application,
111

112
00:06:52,813 --> 00:06:53,650
and of course, like I said,
112

113
00:06:53,650 --> 00:06:57,790
that we didn't use Geometry Manager for our text right.
113

114
00:06:57,790 --> 00:07:02,790
So here, I will say text dot, let's use place,
114

115
00:07:03,980 --> 00:07:08,980
x is 50, y value will be 50, okay.
115

116
00:07:10,610 --> 00:07:13,280
And if I run my application now,
116

117
00:07:15,230 --> 00:07:17,850
as you see now, our message is here.
117

118
00:07:17,850 --> 00:07:18,783
But here, what we need to do,
118

119
00:07:18,783 --> 00:07:22,840
we need to use background actually.
119

120
00:07:22,840 --> 00:07:25,850
We need to use also background for our text
120

121
00:07:25,850 --> 00:07:27,270
and also font.
121

122
00:07:27,270 --> 00:07:29,700
Because it's really, really small, right.
122

123
00:07:29,700 --> 00:07:32,990
So let's make it
123

124
00:07:36,640 --> 00:07:40,204
something like here for the text.
124

125
00:07:40,204 --> 00:07:42,598
And we need to use again here,
125

126
00:07:42,598 --> 00:07:44,060
this is our text property , right.
126

127
00:07:44,060 --> 00:07:48,030
And second one will be our bg okay,
127

128
00:07:48,030 --> 00:07:50,780
and also font property let's use
128

129
00:07:50,780 --> 00:07:52,610
So for the font, I will say
129

130
00:07:53,820 --> 00:07:58,820
font is equal to Arial, 14 and bold, okay.
130

131
00:08:02,030 --> 00:08:06,600
And other one will be our background for our text, okay.
131

132
00:08:06,600 --> 00:08:10,700
Background will be same, okay, this background.
132

133
00:08:10,700 --> 00:08:14,860
So I will copy this guy and paste it here.
133

134
00:08:16,550 --> 00:08:21,550
And even we can use fg font-ground, font colour.
134

135
00:08:23,600 --> 00:08:25,293
Let's say white, okay.
135

136
00:08:28,070 --> 00:08:29,410
White will be fine
136

137
00:08:29,410 --> 00:08:32,710
because our color is like,
137

138
00:08:32,710 --> 00:08:34,660
something like red orange color, right.
138

139
00:08:34,660 --> 00:08:37,230
So white and orange will be fine together.
139

140
00:08:37,230 --> 00:08:39,220
So if I run my application,
140

141
00:08:39,220 --> 00:08:40,810
as you see now, it's here.
141

142
00:08:40,810 --> 00:08:42,030
And it looks better.
142

143
00:08:42,030 --> 00:08:42,940
So what is next?
143

144
00:08:42,940 --> 00:08:44,173
What I need to do here,
144

145
00:08:45,070 --> 00:08:49,460
I need to make connection between my main page,
145

146
00:08:49,460 --> 00:08:51,440
and for, and also About page right?
146

147
00:08:51,440 --> 00:08:52,770
How can I do that?
147

148
00:08:52,770 --> 00:08:55,663
To do that, I need to go to the find my button.
148

149
00:08:57,930 --> 00:09:00,473
And where this is third button?
149

150
00:09:00,473 --> 00:09:01,920
It's here right.
150

151
00:09:01,920 --> 00:09:05,120
It is personBtn.
151

152
00:09:05,120 --> 00:09:06,713
So it is not this one.
152

153
00:09:10,470 --> 00:09:12,950
PersonBtn is okay, second button.
153

154
00:09:12,950 --> 00:09:14,333
Let's run our application first actually.
154

155
00:09:15,780 --> 00:09:18,433
So this is About Us, okay that one.
155

156
00:09:21,490 --> 00:09:23,800
PersonBtn, why it is like that?
156

157
00:09:23,800 --> 00:09:26,030
It says personBtn again.
157

158
00:09:26,030 --> 00:09:28,211
Second button is personBtn.
158

159
00:09:28,211 --> 00:09:30,120
PersonBtn all of them.
159

160
00:09:30,120 --> 00:09:32,030
They are same name, they have.
160

161
00:09:32,030 --> 00:09:35,980
So this is our, sorry it is problem actually.
161

162
00:09:35,980 --> 00:09:39,510
So what this must be person, not personBtn,
162

163
00:09:39,510 --> 00:09:42,580
addperson right, addpersonBtn.
163

164
00:09:42,580 --> 00:09:47,480
The other one is again here, addpersonBtn.
164

165
00:09:49,680 --> 00:09:53,593
And third one will be aboutBtn, okay, aboutBtn.
165

166
00:09:55,630 --> 00:10:00,280
So copy this one and this one also, this one.
166

167
00:10:00,280 --> 00:10:02,630
Because this About Us is here, okay.
167

168
00:10:02,630 --> 00:10:04,870
So how we can make connection, let's do it.
168

169
00:10:04,870 --> 00:10:08,900
Here I will come to here and comma,
169

170
00:10:08,900 --> 00:10:11,563
and here, I will say, command okay,
170

171
00:10:12,460 --> 00:10:14,700
is equal to about,
171

172
00:10:14,700 --> 00:10:18,010
this is our Python file name, okay,
172

173
00:10:18,010 --> 00:10:22,110
dot main, okay.
173

174
00:10:22,110 --> 00:10:24,800
Now, it is here, what I'm doing here,
174

175
00:10:24,800 --> 00:10:29,800
this isn't a, I'm saying that go to find about.py,
175

176
00:10:29,940 --> 00:10:31,890
and its main function.
176

177
00:10:31,890 --> 00:10:33,650
So if you go to here, okay.
177

178
00:10:33,650 --> 00:10:34,910
Find main function,
178

179
00:10:34,910 --> 00:10:38,640
and then, we'll run this window, okay.
179

180
00:10:38,640 --> 00:10:41,300
This is second way but I'm saying that again,
180

181
00:10:41,300 --> 00:10:42,800
I recommend first way, okay.
181

182
00:10:42,800 --> 00:10:46,750
You can have some problems if you use this method.
182

183
00:10:46,750 --> 00:10:49,060
Okay, that's why if you use first one is,
183

184
00:10:49,060 --> 00:10:50,580
it will be better for you.
184

185
00:10:50,580 --> 00:10:52,460
So now, if I run my application,
185

186
00:10:52,460 --> 00:10:54,868
if I say About Us, as you see now,
186

187
00:10:54,868 --> 00:10:57,320
About Us page is here.
187

188
00:10:57,320 --> 00:10:59,320
And we click this one,
188

189
00:10:59,320 --> 00:11:04,320
we run this file's window main function, okay.
189

190
00:11:05,300 --> 00:11:07,970
And we finished our application.
190

191
00:11:07,970 --> 00:11:09,570
I hope you learned a lot,
191

192
00:11:09,570 --> 00:11:10,930
and we learned many things actually
192

193
00:11:10,930 --> 00:11:13,630
because we used multiple files,
193

194
00:11:13,630 --> 00:11:17,170
also multiple classes and a database,
194

195
00:11:17,170 --> 00:11:21,030
and we used our widgets, useful widgets,
195

196
00:11:21,030 --> 00:11:22,430
Tkinter widgets.
196

197
00:11:22,430 --> 00:11:24,122
And for now, that's all.
197

198
00:11:24,122 --> 00:11:25,789
See you in the next.
