0
1
00:00:05,130 --> 00:00:06,220
<v Volkan>Hello everybody, in this section</v>
1

2
00:00:06,220 --> 00:00:07,650
what we are going to do-
2

3
00:00:07,650 --> 00:00:10,450
By the way, I already create our project.
3

4
00:00:10,450 --> 00:00:12,160
What you need to do say,
4

5
00:00:12,160 --> 00:00:15,800
file, new project and here you name your project.
5

6
00:00:15,800 --> 00:00:17,250
And after that, create.
6

7
00:00:17,250 --> 00:00:19,370
And you will create your project here.
7

8
00:00:19,370 --> 00:00:21,880
And what we need to do, here firstly
8

9
00:00:21,880 --> 00:00:24,320
I need to use icons.
9

10
00:00:24,320 --> 00:00:28,190
I already copied my icons, it's here.
10

11
00:00:28,190 --> 00:00:30,488
Of course I will provide all these icons,
11

12
00:00:30,488 --> 00:00:31,590
don't worry about it.
12

13
00:00:31,590 --> 00:00:32,447
And after that what I need to do,
13

14
00:00:32,447 --> 00:00:34,860
I need to create a new Python file here.
14

15
00:00:34,860 --> 00:00:38,638
And here I will say file, item, item file
15

16
00:00:38,638 --> 00:00:40,290
and will name it main, okay.
16

17
00:00:40,290 --> 00:00:45,070
I will use only one Python file for this application, okay.
17

18
00:00:45,070 --> 00:00:48,110
So what I need to do now, I need to create my template.
18

19
00:00:48,110 --> 00:00:50,020
Main template.
19

20
00:00:50,020 --> 00:00:54,410
Here I will say from tkinter import asterisk
20

21
00:00:55,580 --> 00:00:57,410
and after that here I will say from
21

22
00:00:58,500 --> 00:00:59,970
tkinter
22

23
00:00:59,970 --> 00:01:00,920
import
23

24
00:01:00,920 --> 00:01:01,777
ttk .
24

25
00:01:03,200 --> 00:01:04,460
And after that, what I need to do,
25

26
00:01:04,460 --> 00:01:07,510
here I will create a class for my
26

27
00:01:10,461 --> 00:01:11,920
main application, okay.
27

28
00:01:11,920 --> 00:01:14,020
Here I will name it class,
28

29
00:01:14,020 --> 00:01:17,423
and I will name it main application.
29

30
00:01:19,460 --> 00:01:23,800
I will inherit my main application from frame, okay.
30

31
00:01:23,800 --> 00:01:25,550
And after that here what I need to do,
31

32
00:01:25,550 --> 00:01:26,830
I need to say def
32

33
00:01:28,800 --> 00:01:30,450
underscore underscore init.
33

34
00:01:31,790 --> 00:01:33,700
And for the init what I need to say
34

35
00:01:33,700 --> 00:01:35,230
first parameter will be self
35

36
00:01:35,230 --> 00:01:36,930
second parameter will be parent
36

37
00:01:38,020 --> 00:01:41,513
and other one will be args, okay.
37

38
00:01:43,140 --> 00:01:45,623
And the last one will be kwargs.
38

39
00:01:49,110 --> 00:01:50,337
And after that what I need to do here,
39

40
00:01:50,337 --> 00:01:52,640
I need to say frame
40

41
00:01:54,630 --> 00:01:55,850
dot
41

42
00:01:55,850 --> 00:01:57,357
underscore underscore init
42

43
00:01:58,200 --> 00:01:59,033
self
43

44
00:02:00,160 --> 00:02:01,640
parent
44

45
00:02:01,640 --> 00:02:02,473
and again
45

46
00:02:03,960 --> 00:02:05,430
star args
46

47
00:02:06,605 --> 00:02:10,183
and asterisk asterisk kwargs, okay.
47

48
00:02:11,780 --> 00:02:14,460
And here what I need to do after that.
48

49
00:02:14,460 --> 00:02:18,750
Actually I already created our main application,
49

50
00:02:18,750 --> 00:02:22,020
here we also need to use here
50

51
00:02:22,020 --> 00:02:25,700
if underscore underscore name
51

52
00:02:25,700 --> 00:02:29,530
underscore underscore equals equals
52

53
00:02:29,530 --> 00:02:31,560
underscore underscore main
53

54
00:02:31,560 --> 00:02:34,713
and here I will say underscore underscore, okay.
54

55
00:02:36,380 --> 00:02:37,213
After that what I need to do here,
55

56
00:02:37,213 --> 00:02:38,790
I need to say root
56

57
00:02:38,790 --> 00:02:40,173
equals TK.
57

58
00:02:42,780 --> 00:02:46,700
And lets define title for our window.
58

59
00:02:46,700 --> 00:02:49,300
Root dot title,
59

60
00:02:49,300 --> 00:02:50,860
and here I will say
60

61
00:02:51,724 --> 00:02:52,557
Note-
61

62
00:02:52,557 --> 00:02:54,710
Or we can say Text
62

63
00:02:56,726 --> 00:02:57,559
Editor.
63

64
00:02:58,731 --> 00:03:00,870
And also what I need to do now here,
64

65
00:03:00,870 --> 00:03:05,093
I need to use here main application, for my class.
65

66
00:03:06,540 --> 00:03:08,260
Main application, root
66

67
00:03:11,860 --> 00:03:13,960
and here I will use geometry manager
67

68
00:03:13,960 --> 00:03:15,930
pack geometry manager, okay.
68

69
00:03:15,930 --> 00:03:18,540
And here side equals
69

70
00:03:19,820 --> 00:03:20,653
top
70

71
00:03:22,520 --> 00:03:25,513
and I will say fill both,
71

72
00:03:27,850 --> 00:03:29,410
and expand true
72

73
00:03:32,890 --> 00:03:33,980
equals true.
73

74
00:03:35,790 --> 00:03:36,900
After that, what I need to do
74

75
00:03:36,900 --> 00:03:40,688
here I can use icon for my main window.
75

76
00:03:40,688 --> 00:03:43,030
And I will say here root dot
76

77
00:03:43,030 --> 00:03:44,020
icon bitmap
77

78
00:03:45,730 --> 00:03:47,100
and here my
78

79
00:03:48,240 --> 00:03:51,350
path will be icons, and here
79

80
00:03:52,390 --> 00:03:54,340
icon dot ico, okay.
80

81
00:03:54,340 --> 00:03:58,723
Icons, my folder name, after that my file name.
81

82
00:04:02,100 --> 00:04:03,180
Icon dot
82

83
00:04:04,290 --> 00:04:05,850
ico.
83

84
00:04:05,850 --> 00:04:07,750
And last thing what I need to do,
84

85
00:04:07,750 --> 00:04:11,347
I also need to use geometry manager for my root.
85

86
00:04:11,347 --> 00:04:13,490
Root dot geometry
86

87
00:04:14,520 --> 00:04:16,833
and here I will say 100,
87

88
00:04:18,102 --> 00:04:18,935
1250
88

89
00:04:20,527 --> 00:04:21,360
by 850.
89

90
00:04:24,210 --> 00:04:28,550
And the last thing I need to say root dot main loop, okay.
90

91
00:04:28,550 --> 00:04:31,320
Now our application is ready,
91

92
00:04:31,320 --> 00:04:33,483
if I run my application my window.
92

93
00:04:34,680 --> 00:04:37,830
As you see now our main window is here.
93

94
00:04:37,830 --> 00:04:40,923
What I need to do here, I also want to use here,
94

95
00:04:42,870 --> 00:04:46,750
pack geometry manager for this main application, okay.
95

96
00:04:46,750 --> 00:04:50,703
Here I will say self dot parent.
96

97
00:04:50,703 --> 00:04:52,150
Actually firstly lets use it,
97

98
00:04:52,150 --> 00:04:53,020
self dot parent
98

99
00:04:55,960 --> 00:04:57,473
equals parent.
99

100
00:04:59,330 --> 00:05:01,043
And also lets use self dot pack,
100

101
00:05:04,070 --> 00:05:05,290
fill
101

102
00:05:05,290 --> 00:05:06,123
both,
102

103
00:05:07,570 --> 00:05:09,523
and again expand true.
103

104
00:05:13,910 --> 00:05:16,440
Expand equals true, okay.
104

105
00:05:16,440 --> 00:05:19,140
Now, expand it will be,
105

106
00:05:19,140 --> 00:05:21,230
expand equals true.
106

107
00:05:21,230 --> 00:05:23,140
Now we create our main file,
107

108
00:05:23,140 --> 00:05:24,410
okay it's like that.
108

109
00:05:24,410 --> 00:05:27,820
And in next lesson what we are going to create,
109

110
00:05:27,820 --> 00:05:31,140
we are going to create our menu, for our application.
110

111
00:05:31,140 --> 00:05:32,130
For now, that's all.
111

112
00:05:32,130 --> 00:05:33,130
See you in the next.
