0
1
00:00:04,974 --> 00:00:05,973
<v Volkan>Hello again</v>
1

2
00:00:05,973 --> 00:00:06,806
In previous lecture what we did
2

3
00:00:06,806 --> 00:00:09,680
we created our View menu, right?
3

4
00:00:09,680 --> 00:00:10,980
Let me run our application first
4

5
00:00:10,980 --> 00:00:13,080
Here we created our view menu, right?
5

6
00:00:13,080 --> 00:00:14,220
And now in this lecture
6

7
00:00:14,220 --> 00:00:15,053
What we are going to
7

8
00:00:15,053 --> 00:00:17,840
we are going to create our templates menu okay
8

9
00:00:19,205 --> 00:00:20,654
to that let me show
9

10
00:00:20,654 --> 00:00:22,180
show you our original application
10

11
00:00:23,718 --> 00:00:24,930
this is our original application
11

12
00:00:24,930 --> 00:00:26,480
for example here templates right
12

13
00:00:26,480 --> 00:00:29,790
if I click for this one
13

14
00:00:29,790 --> 00:00:30,623
royal blue,
14

15
00:00:30,623 --> 00:00:32,120
royal blue as you seen now
15

16
00:00:32,120 --> 00:00:34,000
we change our template right
16

17
00:00:34,000 --> 00:00:35,236
here what we do, we are
17

18
00:00:35,236 --> 00:00:38,290
we are changing our background color
18

19
00:00:38,290 --> 00:00:40,110
and also our font color right
19

20
00:00:40,110 --> 00:00:41,730
to change our template.
20

21
00:00:41,730 --> 00:00:43,952
So what we need to do here,
21

22
00:00:43,952 --> 00:00:47,280
I will come to and here, and create our menu
22

23
00:00:47,280 --> 00:00:49,963
first of all lets use separator
23

24
00:00:49,963 --> 00:00:53,650
and here I will say themes menu, okay,
24

25
00:00:53,650 --> 00:00:56,090
and after that here, what I need to do,
25

26
00:00:56,090 --> 00:00:57,543
I need to create here,
26

27
00:00:58,600 --> 00:01:01,063
first of all lets create our menu, okay,
27

28
00:01:01,063 --> 00:01:03,910
I will say, themes, okay after themes
28

29
00:01:03,910 --> 00:01:07,700
equals menu, and here, like before we are going
29

30
00:01:07,700 --> 00:01:10,689
to use self parameter and second one will
30

31
00:01:10,689 --> 00:01:12,055
be tearoff
31

32
00:01:12,055 --> 00:01:14,490
okay tearoff equals zero.
32

33
00:01:14,490 --> 00:01:15,940
And after it what I need to do now,
33

34
00:01:15,940 --> 00:01:18,887
here I need to create a color list okay,
34

35
00:01:18,887 --> 00:01:21,163
self dot I will say color list,
35

36
00:01:22,650 --> 00:01:27,030
this color list is going to be a dictionary okay.
36

37
00:01:27,030 --> 00:01:29,397
I am going to use a dictionary here and
37

38
00:01:29,397 --> 00:01:31,990
here what I am, I will do, the first one,
38

39
00:01:31,990 --> 00:01:32,993
the first value,
39

40
00:01:34,000 --> 00:01:35,520
the key,
40

41
00:01:35,520 --> 00:01:37,590
will be my theme name
41

42
00:01:37,590 --> 00:01:40,940
okay, for example default, and after here I'm
42

43
00:01:40,940 --> 00:01:43,010
going to use colors okay.
43

44
00:01:43,010 --> 00:01:46,060
As you remember for the dictionaries, the first one
44

45
00:01:46,060 --> 00:01:48,170
is key and the second value is value right.
45

46
00:01:48,170 --> 00:01:50,100
Key and value, pairs.
46

47
00:01:50,100 --> 00:01:51,550
We are creating pairs right.
47

48
00:01:51,550 --> 00:01:55,540
And here, what I will do, for default I will
48

49
00:01:55,540 --> 00:01:58,260
create font color and also background color,
49

50
00:01:58,260 --> 00:02:00,833
for the font color, and I will say,
50

51
00:02:02,033 --> 00:02:03,250
six 0's okay,
51

52
00:02:03,250 --> 00:02:05,790
here that means black okay.
52

53
00:02:05,790 --> 00:02:09,270
And after that, I will say that, and the other
53

54
00:02:09,270 --> 00:02:12,330
one will be my background color, for background color
54

55
00:02:12,330 --> 00:02:16,520
I will use six F's okay, and as you see now here,
55

56
00:02:16,520 --> 00:02:20,480
six F's right, yep its okay, now its seven,
56

57
00:02:20,480 --> 00:02:22,140
let me use six, okay.
57

58
00:02:22,140 --> 00:02:26,070
So for default, this will be our font color and
58

59
00:02:26,070 --> 00:02:28,880
that one will be our background colour.
59

60
00:02:28,880 --> 00:02:32,603
Let me here use a comment line, first one,
60

61
00:02:34,140 --> 00:02:35,260
is font color
61

62
00:02:37,687 --> 00:02:38,930
and second is
62

63
00:02:38,930 --> 00:02:39,883
background color,
63

64
00:02:41,850 --> 00:02:42,683
okay.
64

65
00:02:42,683 --> 00:02:44,963
And for other one, I will say,
65

66
00:02:46,311 --> 00:02:47,571
my theme name
66

67
00:02:47,571 --> 00:02:49,571
my theme will be Tomato,
67

68
00:02:50,998 --> 00:02:54,415
and for Tomato I will say for the colors,
68

69
00:02:55,844 --> 00:02:57,963
font color will be
69

70
00:02:57,963 --> 00:02:58,796
FFF
70

71
00:02:59,840 --> 00:03:00,974
and
71

72
00:03:00,974 --> 00:03:03,391
four F's and double 0's okay.
72

73
00:03:04,298 --> 00:03:07,852
And after that here I will say that, and again,
73

74
00:03:07,852 --> 00:03:08,685
FF
74

75
00:03:10,017 --> 00:03:10,850
6
75

76
00:03:12,598 --> 00:03:16,219
347 okay, that one is our font color
76

77
00:03:16,219 --> 00:03:17,052
and
77

78
00:03:17,052 --> 00:03:21,022
that one will be our background color for here
78

79
00:03:21,022 --> 00:03:22,609
by the way we need to use commas okay,
79

80
00:03:22,609 --> 00:03:24,442
comma and again comma,
80

81
00:03:25,926 --> 00:03:27,159
and again enter,
81

82
00:03:27,159 --> 00:03:31,159
and after, the other one will be LimeGreen okay,
82

83
00:03:32,499 --> 00:03:35,712
theme name will be LimeGreen, and here
83

84
00:03:35,712 --> 00:03:38,545
double quotes right, sorry, colon,
84

85
00:03:39,728 --> 00:03:40,561
and after
85

86
00:03:40,561 --> 00:03:43,481
that here, and use quotes, for the font color
86

87
00:03:43,481 --> 00:03:44,398
I will use,
87

88
00:03:47,766 --> 00:03:48,683
FFFF again,
88

89
00:03:49,912 --> 00:03:51,302
four F's
89

90
00:03:51,302 --> 00:03:52,627
and one 0
90

91
00:03:52,627 --> 00:03:54,877
this time, and another one,
91

92
00:03:56,808 --> 00:03:57,955
actually here,
92

93
00:03:57,955 --> 00:04:01,034
that will be F use five, okay five F's and
93

94
00:04:01,034 --> 00:04:01,867
one 0.
94

95
00:04:02,755 --> 00:04:04,810
And another one will be my background color for
95

96
00:04:04,810 --> 00:04:06,423
background color I will say,
96

97
00:04:10,280 --> 00:04:12,800
three, two, c, d,
97

98
00:04:12,800 --> 00:04:14,500
three, two okay.
98

99
00:04:14,500 --> 00:04:16,160
And comma again
99

100
00:04:16,160 --> 00:04:17,883
and other one will be,
100

101
00:04:19,514 --> 00:04:20,347
Magenta,
101

102
00:04:22,580 --> 00:04:25,093
okay for Magenta, I will say here,
102

103
00:04:27,167 --> 00:04:30,763
colon and between quotes I will use, I will use,
103

104
00:04:31,860 --> 00:04:33,327
hashtag first, FFF
104

105
00:04:35,363 --> 00:04:36,446
AFA okay dot.
105

106
00:04:37,553 --> 00:04:40,220
Again, hashtag and I will say FF
106

107
00:04:41,424 --> 00:04:42,830
00FF
107

108
00:04:42,830 --> 00:04:43,663
okay.
108

109
00:04:43,663 --> 00:04:46,970
And other one will be royal blue, for the
109

110
00:04:46,970 --> 00:04:50,420
royal blue I will say, here first of all,
110

111
00:04:50,420 --> 00:04:53,163
name of our team royal blue,
111

112
00:04:54,950 --> 00:04:57,230
and colon here again,
112

113
00:04:57,230 --> 00:04:58,730
quotes,
113

114
00:04:58,730 --> 00:05:00,050
and
114

115
00:05:00,050 --> 00:05:01,783
for the font color I will say,
115

116
00:05:03,560 --> 00:05:05,100
FFF
116

117
00:05:05,100 --> 00:05:05,933
and again F
117

118
00:05:05,933 --> 00:05:08,460
BB okay dott
118

119
00:05:08,460 --> 00:05:09,293
Hashtag
119

120
00:05:10,270 --> 00:05:11,870
41
120

121
00:05:11,870 --> 00:05:13,000
69
121

122
00:05:14,370 --> 00:05:15,330
e1
122

123
00:05:15,330 --> 00:05:19,330
okay, and other one will be medium blue,
123

124
00:05:19,330 --> 00:05:21,863
okay for medium blue again I will use quotes,
124

125
00:05:23,163 --> 00:05:24,263
medium blue,
125

126
00:05:26,566 --> 00:05:30,100
colon here, quotes, and for the font color
126

127
00:05:30,100 --> 00:05:31,033
I will use,
127

128
00:05:34,226 --> 00:05:35,059
D1E7
128

129
00:05:36,630 --> 00:05:38,523
E0 okay,
129

130
00:05:40,750 --> 00:05:42,400
dot and again hashtag I will say,
130

131
00:05:44,553 --> 00:05:48,380
0000 and cd, of course you can change this
131

132
00:05:48,380 --> 00:05:50,360
color, for example if you want to use other
132

133
00:05:50,360 --> 00:05:53,120
colors you can do it no problem, I found this,
133

134
00:05:53,120 --> 00:05:56,150
all the colors from internet okay.
134

135
00:05:56,150 --> 00:05:57,897
And the last one will be dracula,
135

136
00:05:57,897 --> 00:06:00,570
and dracula means black of course,
136

137
00:06:00,570 --> 00:06:01,460
and here what
137

138
00:06:01,460 --> 00:06:04,660
I need to use, colon again and quotes,
138

139
00:06:04,660 --> 00:06:06,990
between quotes, font color will be,
139

140
00:06:06,990 --> 00:06:09,720
must be white right, so I will use here,
140

141
00:06:09,720 --> 00:06:12,350
FF, three F's, and again,
141

142
00:06:12,350 --> 00:06:14,010
three, and after that
142

143
00:06:14,010 --> 00:06:16,573
dot and hashtag and font color,
143

144
00:06:17,590 --> 00:06:19,610
background color will be dark right,
144

145
00:06:19,610 --> 00:06:22,010
that means black, so here
145

146
00:06:23,217 --> 00:06:25,380
000000 okay.
146

147
00:06:25,380 --> 00:06:29,300
We are done with our list colors list okay.
147

148
00:06:29,300 --> 00:06:31,073
And after here what I need to do,
148

149
00:06:34,080 --> 00:06:36,809
here let me delete this line also,
149

150
00:06:36,809 --> 00:06:39,163
here I will come and say,
150

151
00:06:41,530 --> 00:06:42,363
self.
151

152
00:06:45,310 --> 00:06:46,143
theme,
152

153
00:06:49,030 --> 00:06:51,240
we can also, we need to use here
153

154
00:06:51,240 --> 00:06:52,940
another variable okay, I will name
154

155
00:06:54,001 --> 00:06:54,834
it theme choice,
155

156
00:06:55,920 --> 00:06:58,870
equals, a string variable okay,
156

157
00:06:58,870 --> 00:07:00,540
I need to use a string variable,
157

158
00:07:00,540 --> 00:07:03,170
StringVar, and after it here, what I need
158

159
00:07:03,170 --> 00:07:07,073
to use, I need to use for loop for i in,
159

160
00:07:07,999 --> 00:07:10,230
sorted and I will say
160

161
00:07:10,230 --> 00:07:11,063
self.
161

162
00:07:14,870 --> 00:07:17,440
color list okay
162

163
00:07:17,440 --> 00:07:18,480
and here,
163

164
00:07:18,480 --> 00:07:20,548
what I'm going to use, I need to say
164

165
00:07:20,548 --> 00:07:21,710
self.
165

166
00:07:21,710 --> 00:07:22,543
themes
166

167
00:07:23,990 --> 00:07:26,030
dot add radio button,
167

168
00:07:26,030 --> 00:07:28,563
this time we are going to use radio button okay,
168

169
00:07:29,693 --> 00:07:31,570
and remember here we used check buttons right,
169

170
00:07:31,570 --> 00:07:33,600
and for the themes we need to use radio buttons
170

171
00:07:33,600 --> 00:07:37,810
okay, and here first variable will be label,
171

172
00:07:37,810 --> 00:07:42,440
and for label, I will use I okay, and after
172

173
00:07:42,440 --> 00:07:45,123
what I will use, I will say, variable,
173

174
00:07:48,330 --> 00:07:49,163
equals,
174

175
00:07:52,614 --> 00:07:54,136
my theme choice right,
175

176
00:07:54,136 --> 00:07:54,969
self.theme
176

177
00:07:56,570 --> 00:07:57,403
choice
177

178
00:07:57,403 --> 00:07:58,236
okay,
178

179
00:07:58,236 --> 00:08:00,690
and I'm not going to use command now okay,
179

180
00:08:00,690 --> 00:08:05,690
command property, we are, we will do that later.
180

181
00:08:05,731 --> 00:08:08,250
And the last thing what I need to do here,
181

182
00:08:08,250 --> 00:08:09,743
I need to come and say,
182

183
00:08:11,660 --> 00:08:12,530
control + D here,
183

184
00:08:12,530 --> 00:08:16,500
we can use control +D here, control + D
184

185
00:08:16,500 --> 00:08:21,103
and say, for the label, lets say templates,
185

186
00:08:26,260 --> 00:08:29,249
templates okay, or themes doesn't matter,
186

187
00:08:29,249 --> 00:08:31,141
and here what we need to say, we are going
187

188
00:08:31,141 --> 00:08:33,670
to use our theme name and it is themes right.
188

189
00:08:33,670 --> 00:08:37,180
Sorry, menu, menu name it is themes,
189

190
00:08:37,180 --> 00:08:39,630
now it is ready, if I run my application
190

191
00:08:39,630 --> 00:08:41,600
I can see my,
191

192
00:08:41,600 --> 00:08:43,263
this menu item right,
192

193
00:08:45,252 --> 00:08:46,160
something wrong now, its okay,
193

194
00:08:46,160 --> 00:08:48,010
as we see now, our templates is here,
194

195
00:08:48,010 --> 00:08:50,690
and dracula for example you see,
195

196
00:08:50,690 --> 00:08:52,820
sorry for default you see, when I hit
196

197
00:08:52,820 --> 00:08:54,963
this one, for LimeGreen for example, you see
197

198
00:08:54,963 --> 00:08:59,963
this checked, if I choose medium blue its checked
198

199
00:09:00,060 --> 00:09:02,618
and RoyalBlue is checked, of course we are going,
199

200
00:09:02,618 --> 00:09:04,750
we need to create a command property for this guy
200

201
00:09:04,750 --> 00:09:08,900
if we want to active our theme, but we are going
201

202
00:09:08,900 --> 00:09:11,290
to that, we are going to that later,
202

203
00:09:11,290 --> 00:09:13,290
for now that's all, see you in the next.
