1
00:00:01,820 --> 00:00:05,930
OK, in this video, want to show you how to hide frames when you click on different menu items.

2
00:00:05,940 --> 00:00:07,450
So we've got a program here.

3
00:00:07,460 --> 00:00:11,290
If we click on, for instance, edit and cut, we get this cut frame.

4
00:00:11,300 --> 00:00:17,000
Now, if we click on file and knew it still says cut frame because cut frame is already there, it's

5
00:00:17,000 --> 00:00:17,600
on top.

6
00:00:17,960 --> 00:00:23,050
And, you know, you can't see the new frame that we're trying to show.

7
00:00:23,060 --> 00:00:24,350
So how can we fix that?

8
00:00:24,380 --> 00:00:29,870
Well, there's probably a bunch of different ways to do about to do it, but I just figured I would

9
00:00:29,870 --> 00:00:31,790
use some grid.

10
00:00:31,790 --> 00:00:33,650
Forget that we learned a couple of videos ago.

11
00:00:33,650 --> 00:00:40,340
So let's create a new function called Hyd Underscore Menu Frames.

12
00:00:41,650 --> 00:00:49,690
Right, and we can just grab each of these guys, so edit frame and we can give it a grid, underscore,

13
00:00:49,700 --> 00:00:50,260
forget.

14
00:00:51,850 --> 00:00:54,970
So we've got an edit frame and we've got a file frame.

15
00:00:57,340 --> 00:01:04,120
So we need a file framed grid, forget now if you packed these on the screen, obviously you're going

16
00:01:04,120 --> 00:01:07,800
to use PIAC forget, but we graded them, as you can see right here.

17
00:01:08,140 --> 00:01:10,390
So inside of them, we have stuff packed.

18
00:01:10,510 --> 00:01:13,240
But the frame itself, we gridded it on to the screen.

19
00:01:13,240 --> 00:01:16,180
So, so, OK, so Heideman new frames.

20
00:01:16,670 --> 00:01:22,890
So now all we have to do is call this function any time one of these functions runs.

21
00:01:23,110 --> 00:01:29,650
So before we put the thing on the screen here in here, let's just hide it.

22
00:01:30,310 --> 00:01:34,180
Let's just hide everything that's sort of come before.

23
00:01:34,180 --> 00:01:36,600
So we could just paste that there.

24
00:01:37,000 --> 00:01:42,040
And if you're not familiar with Python to call a function, you just name it and then put these little

25
00:01:42,040 --> 00:01:43,240
parentheses next to it.

26
00:01:43,420 --> 00:01:44,980
And we're not passing anything in here.

27
00:01:44,980 --> 00:01:46,240
We're just calling the function.

28
00:01:46,450 --> 00:01:48,240
And then each of these will then get called.

29
00:01:48,580 --> 00:01:55,990
So any time we create a new function that shows a new frame, this will be the first line we put in

30
00:01:55,990 --> 00:01:56,160
it.

31
00:01:56,500 --> 00:01:57,850
So, OK, let's go ahead and save that.

32
00:01:58,730 --> 00:02:02,510
And like I said, there's probably a thousand ways you can do this, but just off the top of my head,

33
00:02:02,510 --> 00:02:04,660
that seemed like a kind of logical way to do it.

34
00:02:05,690 --> 00:02:06,680
So that's what I did.

35
00:02:06,710 --> 00:02:13,340
So let's go edit cut, we've got our cut frame now we go file new oh now says file frame, edit cut

36
00:02:13,340 --> 00:02:16,730
got frame and we can toggle back and forth however we want.

37
00:02:16,760 --> 00:02:23,360
So basically what you got here is a structure and a system that you can use to create your entire app.

38
00:02:23,570 --> 00:02:28,670
So you could just wrap every thing in your menu items.

39
00:02:28,670 --> 00:02:28,910
Right.

40
00:02:28,940 --> 00:02:35,240
So if you had a copy thing or whatever and you wanted a whole other screen to show up, you would just

41
00:02:35,690 --> 00:02:36,650
put it everything.

42
00:02:36,650 --> 00:02:42,620
You wanted to show up in a frame and then show that frame like we just did and hide all the other frames

43
00:02:42,620 --> 00:02:43,670
that have come before it.

44
00:02:44,000 --> 00:02:44,810
And you're good to go.

45
00:02:44,820 --> 00:02:47,570
Now, this is kind of weird looking, right?

46
00:02:47,570 --> 00:02:49,400
It's not taking up the whole screen.

47
00:02:49,640 --> 00:02:51,800
It's just kind of stuck here on the corner.

48
00:02:52,010 --> 00:02:53,740
But that's just because that's how we designed it.

49
00:02:53,750 --> 00:02:58,640
If you were to design your thing, to do something else, it would it would show up as something else.

50
00:02:58,650 --> 00:03:06,650
So so you now have the tools to sort of create any kind of software GUI framework that you want fairly

51
00:03:06,650 --> 00:03:09,020
easily using these frames in these menu items.

52
00:03:09,260 --> 00:03:10,820
So that's pretty cool.

53
00:03:11,420 --> 00:03:11,770
Right.

54
00:03:11,780 --> 00:03:12,770
And it was really easy.

55
00:03:12,770 --> 00:03:13,040
Right.

56
00:03:13,370 --> 00:03:17,120
So again, we use this blue thing just so that we could see it.

57
00:03:17,360 --> 00:03:19,460
Normally, you're not going to give these things a color.

58
00:03:19,760 --> 00:03:21,890
Normally you're not going to give these things a border.

59
00:03:22,070 --> 00:03:22,440
Right.

60
00:03:22,670 --> 00:03:24,830
They're just going to be invisible.

61
00:03:24,860 --> 00:03:28,880
It's the things you put inside of them that are the important things anyway.

62
00:03:29,180 --> 00:03:32,540
And we'll see that going forward as we build out different apps and things.

63
00:03:32,760 --> 00:03:34,760
So I think that's all for this video.

64
00:03:34,760 --> 00:03:39,170
In the next video, we'll start to look at status bars, bars that go at the bottom of the screen.

65
00:03:39,170 --> 00:03:44,060
That update based on whatever is going on in your software, and that'll be in the next video.
