1
00:00:00,540 --> 00:00:01,980
Well, hello, dear friends.

2
00:00:02,430 --> 00:00:03,540
I'm so glad you're back.

3
00:00:03,990 --> 00:00:08,100
Because right now, we're going to implement this back button functionality.

4
00:00:09,180 --> 00:00:10,140
So we'll dig in.

5
00:00:13,190 --> 00:00:18,860
Now, first of all, let's see what we want to do with the back button, and that way you'll get how

6
00:00:18,860 --> 00:00:19,310
to do it.

7
00:00:20,700 --> 00:00:28,110
So if we press manage employee and we press back, we should be able to hide this window and display

8
00:00:28,110 --> 00:00:29,160
the main window again.

9
00:00:29,160 --> 00:00:29,460
Right.

10
00:00:30,360 --> 00:00:31,290
Sounds simple enough.

11
00:00:32,310 --> 00:00:36,900
So let's go to the manager employees and add some code.

12
00:00:39,650 --> 00:00:48,230
All right, so we will have a successful back button when we use self dot UI, dot back button.

13
00:00:49,550 --> 00:00:51,350
Now, I'm sure you already know how to do that.

14
00:00:52,430 --> 00:00:56,060
Dot clicked, dot connect itself.

15
00:00:56,060 --> 00:00:58,370
Dot back button clicked.

16
00:01:01,840 --> 00:01:04,010
Of course, you can do it how you want to.

17
00:01:04,490 --> 00:01:06,560
So now let's define a function.

18
00:01:12,740 --> 00:01:15,920
Def back button clicked self.

19
00:01:19,890 --> 00:01:21,390
Self-taught hide.

20
00:01:23,580 --> 00:01:30,120
All right, cool, so now what we want to do is hide this window so that it's hidden and it shows a

21
00:01:30,120 --> 00:01:33,120
window, which is actually its parent.

22
00:01:34,400 --> 00:01:35,180
Self-taught.

23
00:01:35,390 --> 00:01:37,940
Main menu dots show.

24
00:01:39,860 --> 00:01:42,950
And here we have it stored in this variable here.

25
00:01:44,400 --> 00:01:47,160
That seems to be pretty OK.

26
00:01:47,370 --> 00:01:48,900
Why don't we test it out, in fact?

27
00:01:49,350 --> 00:01:50,730
So press back.

28
00:01:51,570 --> 00:01:52,920
Yeah, you see how that works.

29
00:01:54,570 --> 00:01:57,840
So now we've got to do the same thing for view chart menu.

30
00:01:59,040 --> 00:02:08,190
So let's go to charts and we have to type basically the same code, self-taught UI dot back button,

31
00:02:08,190 --> 00:02:13,920
dot clicked dot connect itself, dot back button clicked.

32
00:02:18,560 --> 00:02:20,200
And then we define our function.

33
00:02:21,290 --> 00:02:23,780
Def back button clicked self.

34
00:02:27,640 --> 00:02:28,840
Self-taught hide.

35
00:02:35,800 --> 00:02:38,620
Self doubt, main menu, dot show.

36
00:02:42,260 --> 00:02:43,100
OK, let's see.

37
00:02:43,910 --> 00:02:50,000
Well, we don't have the back button because we forgot to rename it when we created the way through

38
00:02:50,000 --> 00:02:51,650
the designer, so.

39
00:02:51,970 --> 00:02:53,600
So let's run the program.

40
00:02:55,590 --> 00:02:58,080
Excellency, your charts go back.

41
00:02:59,930 --> 00:03:01,460
And this one also works.

42
00:03:04,000 --> 00:03:05,620
Very good, so that's it for now.

43
00:03:05,650 --> 00:03:07,900
We've implemented the back button functionality.

44
00:03:08,760 --> 00:03:11,280
And in our next lesson, we're going to continue to code.

45
00:03:11,490 --> 00:03:12,540
So I want to see you there.

46
00:03:12,910 --> 00:03:14,130
I'll see in the next video.
