0
1
00:00:04,980 --> 00:00:06,417
<v ->Hello again, inf previous lecture what we did</v>
1

2
00:00:06,417 --> 00:00:08,720
we create our function for
2

3
00:00:08,720 --> 00:00:09,553
italic button, right.
3

4
00:00:09,553 --> 00:00:11,370
And now, in this lesson what I want to do,
4

5
00:00:11,370 --> 00:00:13,290
I want to create our function for this guy
5

6
00:00:13,290 --> 00:00:14,870
underline button.
6

7
00:00:14,870 --> 00:00:17,370
And here, what we need to do, of course,
7

8
00:00:17,370 --> 00:00:21,370
let me we need to go to find this guy underline button right,
8

9
00:00:21,370 --> 00:00:25,120
it's here, and to create a command property command
9

10
00:00:25,120 --> 00:00:29,390
equals, and I will say here self dot parent,
10

11
00:00:29,390 --> 00:00:32,263
again change underline,
11

12
00:00:34,240 --> 00:00:36,610
underline, okay.
12

13
00:00:36,610 --> 00:00:40,080
And now what I need to do, I need to copy this name,
13

14
00:00:40,080 --> 00:00:42,790
and paste it here, right?
14

15
00:00:42,790 --> 00:00:44,890
And here, I will create my function,
15

16
00:00:44,890 --> 00:00:48,990
def underline, and what I need to do now here,
16

17
00:00:48,990 --> 00:00:52,990
comma * args, right?
17

18
00:00:52,990 --> 00:00:54,960
And here, what I need to do, actually,
18

19
00:00:54,960 --> 00:00:59,220
it is very, very similar, so even I can copy this guys here,
19

20
00:00:59,220 --> 00:01:03,260
I will copy this one, and paste it here, okay?
20

21
00:01:03,260 --> 00:01:06,530
And first let's run our application for underline
21

22
00:01:06,530 --> 00:01:08,970
what we need to do, let's figure it out.
22

23
00:01:08,970 --> 00:01:13,097
And here, if I press underline, you see it's here,
23

24
00:01:13,097 --> 00:01:16,080
it returns me for underline, zero.
24

25
00:01:16,080 --> 00:01:18,510
That means it is not underlined my text, okay.
25

26
00:01:18,510 --> 00:01:21,620
If value is one, that means my text is already underlined.
26

27
00:01:21,620 --> 00:01:24,963
So what I can do, here I will say,
27

28
00:01:27,430 --> 00:01:32,430
if text pro dot actual, right?
28

29
00:01:35,330 --> 00:01:38,090
And here, what I need to use, I need to use underline.
29

30
00:01:38,090 --> 00:01:42,597
Underline equals equals zero, right?
30

31
00:01:45,310 --> 00:01:49,590
Equals equals zero, I will say here,
31

32
00:01:49,590 --> 00:01:54,033
self dot text editor, configure, right?
32

33
00:01:54,033 --> 00:01:59,033
And I will say again, font equals font family,
33

34
00:02:04,040 --> 00:02:09,040
font size, and the last one will be underline, okay.
34

35
00:02:12,520 --> 00:02:13,353
Underline.
35

36
00:02:14,350 --> 00:02:16,480
And if not, elif, right?
36

37
00:02:16,480 --> 00:02:21,480
And here, I will use elif, and we can copy this guy,
37

38
00:02:22,100 --> 00:02:26,320
and paste it here, and now this value will be one,
38

39
00:02:26,320 --> 00:02:30,120
right, not zero, so one, and even I can copy this one,
39

40
00:02:30,120 --> 00:02:32,230
and paste it here.
40

41
00:02:32,230 --> 00:02:34,683
And this time, what I will say, I will say,
41

42
00:02:37,220 --> 00:02:40,740
instead of underline, I will say normal, okay?
42

43
00:02:40,740 --> 00:02:42,603
Now, if I run my application,
43

44
00:02:44,500 --> 00:02:47,460
so here, if I press underline,
44

45
00:02:47,460 --> 00:02:48,940
now, as you see, it's underlined.
45

46
00:02:48,940 --> 00:02:51,870
If I pressed again, it's not underlined, okay.
46

47
00:02:51,870 --> 00:02:56,370
So this is how we can create our underline text function.
47

48
00:02:56,370 --> 00:02:59,013
For now, that's all, see you in the next.
