1
00:00:01,620 --> 00:00:06,270
OK, so I mentioned a couple of videos ago that creating widgets is always a two step process, you

2
00:00:06,270 --> 00:00:08,100
create the thing and then you put it on the screen.

3
00:00:08,370 --> 00:00:11,430
And in the last video, we packed the things on the screen.

4
00:00:11,430 --> 00:00:15,030
But you probably already kind of figured out that that's not the greatest way to do it.

5
00:00:15,660 --> 00:00:21,870
The other way is a grid system, and it's a much better way, but a little bit more complicated way.

6
00:00:22,300 --> 00:00:25,110
But, you know, your programs are going to become more intricate.

7
00:00:25,110 --> 00:00:28,500
You're going to want to put things exactly in exact spots.

8
00:00:28,980 --> 00:00:31,770
And to do that, you need to use something like the grid system.

9
00:00:31,770 --> 00:00:33,960
So it's just like PIAC.

10
00:00:33,960 --> 00:00:36,150
But instead of PIAC, it's grid.

11
00:00:36,450 --> 00:00:36,790
Right.

12
00:00:37,590 --> 00:00:38,940
And so that's changed both of it.

13
00:00:38,940 --> 00:00:45,030
And I should mention that it is possible use both PAC and Grid at the same time for your purposes.

14
00:00:45,030 --> 00:00:49,830
Just assume that you can't use the grid system and the PAC system at the same time.

15
00:00:50,130 --> 00:00:54,600
Like I said, there's ways you can do it, but not sort of for the intermediate to basic stuff that

16
00:00:54,600 --> 00:00:55,320
we're going to be learning.

17
00:00:55,500 --> 00:00:56,940
You need to pick one or the other.

18
00:00:56,950 --> 00:00:59,400
So that's why we have to change the grid.

19
00:00:59,850 --> 00:01:02,160
We have to change both of these two grid.

20
00:01:02,890 --> 00:01:07,110
OK, so to use the grid system, it is just like it sounds like it is a grid.

21
00:01:07,110 --> 00:01:10,320
Just picture a grid in your mind of rows and columns.

22
00:01:10,320 --> 00:01:15,960
Did you ever use grid paper when you were in grade school, you know, to do math stuff, to plot charts

23
00:01:15,960 --> 00:01:16,470
and stuff?

24
00:01:16,710 --> 00:01:17,270
Same thing.

25
00:01:17,280 --> 00:01:21,690
Just think of a grid system, a grid paper, and they're sort of numbered.

26
00:01:22,020 --> 00:01:25,200
Not specifically, but you'll see there are numbers involved.

27
00:01:25,350 --> 00:01:28,010
So to use a grid system, think rows and columns, right.

28
00:01:28,020 --> 00:01:30,870
So row equals something.

29
00:01:31,110 --> 00:01:32,430
Column equals something.

30
00:01:32,430 --> 00:01:32,790
So.

31
00:01:34,140 --> 00:01:37,990
Rose, go left to right columns, go up and down, right?

32
00:01:38,050 --> 00:01:40,520
So and they all start at zero.

33
00:01:40,710 --> 00:01:47,760
So the very first row is the zero zero zero zero and the very first column is the zero fifth column.

34
00:01:48,310 --> 00:01:52,580
So right top right hand corner, zero zero.

35
00:01:52,890 --> 00:01:56,820
So if we now want something one down, let's get rid of this paddock's.

36
00:01:57,060 --> 00:01:59,220
And I'm just going to copy this.

37
00:02:01,470 --> 00:02:08,130
And now if we want something one down, that would be row one, column zero, so this will put it right

38
00:02:08,130 --> 00:02:08,670
below us.

39
00:02:08,700 --> 00:02:10,710
Let's save this and take a look at this.

40
00:02:12,700 --> 00:02:19,670
Let's run this, and now we see this stuff is smushed up into the corner.

41
00:02:19,990 --> 00:02:27,210
This whole thing is Rosero and this whole thing is row one and noticed these rows are different sizes.

42
00:02:27,220 --> 00:02:31,020
The rows will take the size of the thing unless you specify otherwise.

43
00:02:31,360 --> 00:02:34,350
So don't think of it as an absolute thing.

44
00:02:34,360 --> 00:02:36,390
It's all relative to what's inside.

45
00:02:36,400 --> 00:02:42,430
So, OK, now that's zero zero and one zero.

46
00:02:42,430 --> 00:02:44,680
I guess we can change this around.

47
00:02:45,830 --> 00:02:54,410
We can maybe put this maybe we want to put this on the same row and column one, so the next column

48
00:02:54,410 --> 00:02:54,710
over.

49
00:02:54,710 --> 00:02:55,910
So let's go ahead and save this.

50
00:03:00,680 --> 00:03:08,060
And now they're on the same row, column zero, hello, world column, one second thing, remember,

51
00:03:08,060 --> 00:03:09,080
everything starts at zero.

52
00:03:09,080 --> 00:03:10,460
It's kind of weird to wrap it around.

53
00:03:10,460 --> 00:03:12,980
You know, you always want to put the first thing on the first row.

54
00:03:13,250 --> 00:03:17,750
And it always starts at zero, though, and now they're right next to each other.

55
00:03:17,760 --> 00:03:18,380
So that's cool.

56
00:03:19,480 --> 00:03:27,680
What if we want to put this thing below our first row, but not directly underneath over to the side?

57
00:03:27,970 --> 00:03:33,400
Well, we can do that by, let's say, putting it in row one and then keeping it in column one, that

58
00:03:33,400 --> 00:03:34,350
next column over.

59
00:03:34,360 --> 00:03:35,320
So save this.

60
00:03:39,270 --> 00:03:42,910
Boom, now it's down below and there it is.

61
00:03:42,930 --> 00:03:46,200
So that's the grid system is not a whole lot more complicated than that.

62
00:03:46,200 --> 00:03:48,450
You just sort of have to keep track of where things are.

63
00:03:48,630 --> 00:03:53,370
And if there's a lot of things on your screen, it can kind of get a little, you know, a little hard

64
00:03:53,370 --> 00:03:58,020
to keep track of what's in row one or what's on row 12, what's in column 16.

65
00:03:58,020 --> 00:03:59,970
You know, you've got to really keep track of these things.

66
00:04:00,150 --> 00:04:03,180
And that's why I comment in your code is so important.

67
00:04:03,180 --> 00:04:09,690
You know, we don't have any comments so far, but now I would say create a label.

68
00:04:11,310 --> 00:04:14,370
And or just create labels.

69
00:04:17,010 --> 00:04:22,320
Right, but it is important to comment you could not comment better going forward as our program gets

70
00:04:22,320 --> 00:04:27,540
more complicated, but that's a great system, really not that complicated, just a little bit more

71
00:04:27,540 --> 00:04:31,140
complicated than the park system where it's just packing everything up on the screen here.

72
00:04:31,140 --> 00:04:34,820
You have to just specify what's what and where it goes.

73
00:04:35,130 --> 00:04:39,360
So in the next video will spend just a couple of minutes talking about some of the options for the grid

74
00:04:39,360 --> 00:04:39,750
system.

75
00:04:39,750 --> 00:04:43,920
There's not many, but a couple of important things we need to look at, and that'll be in the next

76
00:04:43,920 --> 00:04:44,250
video.
