1
00:00:01,020 --> 00:00:06,960
Hello, everyone, and this video, I will show you how you can use the grid function in the previous

2
00:00:06,960 --> 00:00:12,760
videos, I have shown you how you can create buttons, labels and trees and how you can package.

3
00:00:13,110 --> 00:00:19,980
And this video, I will show you how you can order it in application, because if we use just the function

4
00:00:19,980 --> 00:00:21,630
back, we can't order it.

5
00:00:21,630 --> 00:00:27,870
Because if we if we have, for example, two buttons or a button at label, I would use the function

6
00:00:27,870 --> 00:00:32,310
back so we would have the first item, which is, for example, the label.

7
00:00:32,310 --> 00:00:38,580
Then if we will back a button, we will we will have it in second place, etc. But if you want to put

8
00:00:38,580 --> 00:00:43,800
it in same line, for example, in like this up, if we want to build like this up, for example, we

9
00:00:43,800 --> 00:00:50,970
won't hear the label and here the entry, we can't use the function back because the function back doesn't

10
00:00:51,240 --> 00:00:53,160
order our items.

11
00:00:53,440 --> 00:00:57,110
So to do this, we need to use the function grid.

12
00:00:57,480 --> 00:01:02,160
So the first the first thing that we have to do is to create our application.

13
00:01:02,550 --> 00:01:13,380
So we will use the import the entire library to him to hold everything.

14
00:01:14,070 --> 00:01:19,110
Then we will create the route it will take.

15
00:01:20,370 --> 00:01:23,820
Then we will put it as main loop.

16
00:01:26,040 --> 00:01:34,440
Just here we will change the some women do some editing on our app, for example.

17
00:01:34,440 --> 00:01:37,030
We will change the coffee.

18
00:01:37,030 --> 00:01:38,880
You will change the background.

19
00:01:39,300 --> 00:01:50,430
The because I picked this color two six three the four two.

20
00:01:51,510 --> 00:01:59,160
Then we will change the title roots, the title we call it.

21
00:01:59,340 --> 00:02:03,960
I know for example like this that I have shown you like this one.

22
00:02:04,690 --> 00:02:09,300
OK, so then we will change the icon.

23
00:02:13,950 --> 00:02:26,480
Here, no good that's equal, then, would change the geometry of our geometry, we put it to the hundred

24
00:02:26,490 --> 00:02:28,860
by forty four hundred.

25
00:02:28,860 --> 00:02:35,090
Sorry, when you see how does it look, we can see anything.

26
00:02:35,340 --> 00:02:39,080
Sorry, I didn't hear it.

27
00:02:40,350 --> 00:02:43,450
So this is our window here.

28
00:02:43,790 --> 00:02:52,020
We want to park the country like this, for example, this entry and this text so we can't use the function

29
00:02:52,020 --> 00:02:52,410
up.

30
00:02:52,740 --> 00:02:53,400
Buxley.

31
00:02:53,640 --> 00:02:59,850
So the first thing that we need to do, we created after that we will Puckett's to create a label,

32
00:02:59,850 --> 00:03:04,380
for example, we will call it to text Ecolabel.

33
00:03:05,910 --> 00:03:14,850
Then here we put it in the root text equation as we have their say high, for example.

34
00:03:15,480 --> 00:03:25,290
Then the forms ACORN will which oldroyd then here 50.

35
00:03:26,850 --> 00:03:29,940
After that we'll do some some padding.

36
00:03:30,390 --> 00:03:37,650
So X equals ten then, but Y equals 10.

37
00:03:39,620 --> 00:03:51,950
That is, then we will create an entry so into all the college books, for example, what's it called

38
00:03:52,730 --> 00:04:03,290
entry, which is in DELUDES format, will give it to the size.

39
00:04:03,290 --> 00:04:16,430
For example, here we have we will put it more than the size 15 to then the width equal 20.

40
00:04:17,180 --> 00:04:24,510
OK, here we have created a label and an entry into British with you to buck this.

41
00:04:24,880 --> 00:04:27,750
These items, for example, this label and this entry.

42
00:04:27,770 --> 00:04:34,430
We used the function back, but in this case, we want to put it like this in the same line.

43
00:04:34,430 --> 00:04:37,160
So we have to use another function, which is great.

44
00:04:37,700 --> 00:04:46,160
The function great will define the which defines the I will execute it another time to show you the

45
00:04:46,160 --> 00:04:53,830
great function will define the row and the colon where we want to put our item, for example, label

46
00:04:53,870 --> 00:04:54,580
or the entry.

47
00:04:54,950 --> 00:04:58,610
So we will use it like this has before.

48
00:04:58,610 --> 00:05:03,340
For example, text point grigri.

49
00:05:03,860 --> 00:05:06,410
This is the function that we want to use here.

50
00:05:06,700 --> 00:05:12,320
We have the parameter, for example, row equals we will put it in row zero.

51
00:05:12,500 --> 00:05:17,120
The first row is zero like arise and like tables, exit row.

52
00:05:17,660 --> 00:05:24,100
Then we have the columns so we will write it column equal for example zero.

53
00:05:24,150 --> 00:05:29,810
We will, we want to, to, to put the this text which is high say high.

54
00:05:29,840 --> 00:05:33,410
We, we want to put it in the Rosero and the column zero.

55
00:05:34,310 --> 00:05:36,410
Then here we will make some padding.

56
00:05:37,790 --> 00:05:42,520
I will put it after we will see how does it look after we will change it.

57
00:05:42,890 --> 00:05:50,630
So as you can see here, our, our text or label say how we will change some things will change the

58
00:05:50,630 --> 00:05:57,140
background and the foreground will change the background will put it like the background of the up.

59
00:05:57,800 --> 00:06:07,660
So two six three, the four to then the foreground, we will put it right.

60
00:06:08,990 --> 00:06:13,540
OK, now really want it another time.

61
00:06:13,580 --> 00:06:15,710
As you can see, this is our text.

62
00:06:16,820 --> 00:06:24,700
Now I want to change the I want to make some putting on it to make some space between it and the and

63
00:06:25,720 --> 00:06:26,890
the bottom of the window.

64
00:06:27,170 --> 00:06:36,200
So here with me but x X equals ten for example then but Y equal to you see.

65
00:06:36,200 --> 00:06:37,000
How does it look.

66
00:06:37,370 --> 00:06:41,360
There is not big changes but we will see in the entry.

67
00:06:41,780 --> 00:06:45,140
So now we want to back the entry.

68
00:06:45,140 --> 00:06:50,620
So same time we will put a box that great.

69
00:06:51,380 --> 00:06:59,480
No here we have the row that they are in the same row, so row zero and the column is in the next column.

70
00:06:59,480 --> 00:07:11,450
So we put it column equal one that we would make some I x equals ten and but Y equals ten.

71
00:07:12,140 --> 00:07:19,160
That said, we see this is our our label and this is the entry.

72
00:07:19,160 --> 00:07:24,020
We would change some which I do with here to see it more clearly.

73
00:07:24,020 --> 00:07:25,190
For example, 15.

74
00:07:27,880 --> 00:07:33,980
OK, this is our text and our entry, we can write anything we want here.

75
00:07:34,800 --> 00:07:38,470
Now what we want to do, we want to do like this.

76
00:07:38,680 --> 00:07:41,560
We will just add some buttons.

77
00:07:41,770 --> 00:07:47,950
So when we click in this button, for example, if if we have a text here, when we click in this button,

78
00:07:47,950 --> 00:07:52,680
for example, we will print that text here in another label.

79
00:07:53,200 --> 00:07:57,140
And if we take in this in this button, we will clear this text.

80
00:07:57,160 --> 00:07:59,760
OK, so we will try to do it now.

81
00:08:00,190 --> 00:08:04,810
So we will do the same thing for the buttons we will created here.

82
00:08:04,810 --> 00:08:10,870
For example, the first button is to print a call

83
00:08:13,600 --> 00:08:25,080
button, then we will put it in the route, then text so we text equal will make its print or not.

84
00:08:25,780 --> 00:08:35,050
Then here the we change the font for example, equal of the.

85
00:08:37,410 --> 00:08:47,040
Left, then here, put it, for example, 50, I think it's great, actually, we'll use this one,

86
00:08:47,550 --> 00:08:50,150
but we'll see after that.

87
00:08:50,160 --> 00:08:51,960
We will make some padding here.

88
00:08:51,960 --> 00:08:59,070
But X equals ten then, but Y equals ten to.

89
00:09:00,060 --> 00:09:09,140
Then we create the other button, which will clear our label and make some spaces here.

90
00:09:09,720 --> 00:09:12,210
Then here, college clear.

91
00:09:13,380 --> 00:09:16,290
Equal button.

92
00:09:18,700 --> 00:09:31,470
We put it in the rules, then things equal equally clear, the same thing for this parameter is we will

93
00:09:31,470 --> 00:09:42,690
just copy control C Control V, so industrialized, we have created the print button and the clear button.

94
00:09:43,440 --> 00:09:50,220
Now we just need to back it or we will use the function print because as I told you, we can't use the

95
00:09:50,220 --> 00:09:54,800
function grid and the function back in the same program.

96
00:09:55,080 --> 00:09:56,100
We will have an error.

97
00:09:56,550 --> 00:10:02,870
So we have just we have to use the function back or grid.

98
00:10:03,030 --> 00:10:04,620
We can't use it in the same time.

99
00:10:04,720 --> 00:10:19,260
OK, so here we will put the first button, which is print print that grid here, then here, which

100
00:10:19,500 --> 00:10:21,750
we choose the we one.

101
00:10:22,980 --> 00:10:24,240
Then the column.

102
00:10:27,490 --> 00:10:27,920
Zero.

103
00:10:28,750 --> 00:10:34,600
And we will do some padding, but we don't need it for the moment.

104
00:10:35,200 --> 00:10:49,670
Now, the second button, which is clear for to great then here the drill two, because we want it next,

105
00:10:50,740 --> 00:10:54,360
then the the column zero.

106
00:10:55,900 --> 00:11:00,970
No, if we were on our program, you will see that this is our buttons.

107
00:11:01,480 --> 00:11:06,700
But the problem is that these buttons are not in the middle of our.

108
00:11:07,720 --> 00:11:08,760
Our application.

109
00:11:08,770 --> 00:11:14,310
So to do this, we need, for example, to respond to columns.

110
00:11:14,560 --> 00:11:17,830
So we will have a great looking for our buttons.

111
00:11:18,100 --> 00:11:21,230
We will see we will use it in this function functions.

112
00:11:21,250 --> 00:11:28,390
For example, if I'm sorry about this here, if we want to spun two columns, we would use it in the

113
00:11:28,390 --> 00:11:28,900
function.

114
00:11:29,290 --> 00:11:31,080
It is one of these parameters.

115
00:11:31,450 --> 00:11:41,020
So the function to do this call column three, column SP1, then X1.

116
00:11:41,320 --> 00:11:44,270
Here we were, write how many columns we want to spot.

117
00:11:44,290 --> 00:11:50,890
So for example, in this case we have two columns and we won't respond to Spotnitz, so we will write

118
00:11:50,890 --> 00:11:59,230
two, which means that we will I will show you here, this means that for example, this is the up here.

119
00:11:59,230 --> 00:12:01,240
We will divide it into the side.

120
00:12:01,300 --> 00:12:02,540
This is the first column.

121
00:12:02,560 --> 00:12:03,410
This is the second.

122
00:12:03,910 --> 00:12:11,980
So if we write spun two means that this button will be in the middle of all of this, these two buttons

123
00:12:12,610 --> 00:12:14,060
to make it more great.

124
00:12:14,090 --> 00:12:18,900
We may hear more spine with more padding here, for example.

125
00:12:19,180 --> 00:12:26,380
But as we put it, me the same thing here and same thing here.

126
00:12:26,380 --> 00:12:32,230
We will we will do the spine function control, see and hear.

127
00:12:35,040 --> 00:12:41,640
As you can see, this is our buttons, we'll just add some padding here to make it the same thing.

128
00:12:43,110 --> 00:12:45,110
Where is it here, for example?

129
00:12:45,120 --> 00:12:48,470
I would put it turns you on.

130
00:12:48,490 --> 00:12:49,050
Why not?

131
00:12:50,720 --> 00:13:05,030
I want to say, OK, no, we will just add some padding here to make space between the these two buttons.

132
00:13:05,300 --> 00:13:12,120
So but y equal to it works, I think, just for one button.

133
00:13:12,800 --> 00:13:19,880
So our main program will do if we are right here, something we want, if we play it, if we press this

134
00:13:19,880 --> 00:13:27,260
button, when this program will take this text and put it in the label here, then if we press this

135
00:13:27,260 --> 00:13:30,620
button it will clear this label.

136
00:13:31,040 --> 00:13:35,180
So write it here, for example, in the comments of the buttons.

137
00:13:35,580 --> 00:13:40,280
So here, think we make it to I don't know,

138
00:13:43,400 --> 00:13:44,000
come on.

139
00:13:46,250 --> 00:13:49,670
It would be for print.

140
00:13:49,820 --> 00:13:52,100
I just want to make it like this.

141
00:13:52,550 --> 00:13:55,760
And here we may come on.

142
00:13:56,060 --> 00:13:57,380
Won't see for clear.

143
00:13:58,610 --> 00:14:02,120
OK, now we will define these two functions.

144
00:14:02,120 --> 00:14:07,400
So def be then here.

145
00:14:07,550 --> 00:14:08,950
What, what did we say.

146
00:14:09,140 --> 00:14:18,590
We said that if we want to, if we, if we click or press the button print we will take the text that

147
00:14:18,590 --> 00:14:23,340
we have in this country and print it in a new label.

148
00:14:23,720 --> 00:14:27,440
So the first thing that we have to do is to bring that text.

149
00:14:27,680 --> 00:14:31,680
So we call it for example, T for text.

150
00:14:32,210 --> 00:14:41,860
I don't know why I am using this names, but to make it easy to equal books that get OK.

151
00:14:42,950 --> 00:14:45,290
After that, we will create the label.

152
00:14:45,770 --> 00:15:01,070
We will call it, for example, label equal label here we put it in the root text equal t then we will

153
00:15:01,430 --> 00:15:04,610
agree and we will the package or we will use the function.

154
00:15:04,630 --> 00:15:05,060
Great.

155
00:15:05,090 --> 00:15:08,350
So love label point green.

156
00:15:08,720 --> 00:15:11,870
Here we are in the low three.

157
00:15:11,870 --> 00:15:15,440
I think this the level three then the column.

158
00:15:18,150 --> 00:15:32,460
Collomb equals zero, then we use the column and we respond, as we did with the the buttons so called

159
00:15:32,460 --> 00:15:41,190
unspun equal to like this, that we will you will add some padding in the way.

160
00:15:41,640 --> 00:15:47,050
So but Y equals 10 and that's it.

161
00:15:47,670 --> 00:15:48,870
So we will try it.

162
00:15:49,470 --> 00:15:51,480
We'll see what we have here.

163
00:15:52,840 --> 00:15:56,400
I forget to define the C function.

164
00:15:56,760 --> 00:16:01,520
We just defined C equal return.

165
00:16:02,460 --> 00:16:09,720
OK, just to try our program, so, for example, if we're right here, hello, if we click print we

166
00:16:09,720 --> 00:16:10,310
see here.

167
00:16:10,320 --> 00:16:10,680
Hello.

168
00:16:10,740 --> 00:16:14,130
OK, now we need to program this button.

169
00:16:14,130 --> 00:16:18,490
So if we click the clear button, we will clear this label.

170
00:16:19,110 --> 00:16:21,450
So we make some changes in this.

171
00:16:21,450 --> 00:16:22,940
I don't want it like this.

172
00:16:22,960 --> 00:16:27,060
So, for example, I want to make font equal.

173
00:16:27,060 --> 00:16:31,170
For example, I don't know Ondoy.

174
00:16:31,500 --> 00:16:40,860
I like this for Broyd sorry Ondoy than the size.

175
00:16:40,860 --> 00:16:44,760
I would make it twenty three and that's it.

176
00:16:44,870 --> 00:16:54,280
And I will change the background color midi equal the same color of our background.

177
00:16:54,300 --> 00:16:57,440
So this is two six.

178
00:16:58,200 --> 00:16:59,970
I don't know three.

179
00:17:00,480 --> 00:17:03,720
The Falchuk will see.

180
00:17:03,900 --> 00:17:04,290
No.

181
00:17:04,740 --> 00:17:07,200
So here we have for example hello.

182
00:17:07,200 --> 00:17:08,760
Or you say hi.

183
00:17:08,790 --> 00:17:10,520
So we say hi Breen's.

184
00:17:10,890 --> 00:17:12,080
He had our text.

185
00:17:12,360 --> 00:17:15,050
No we want to, we will program the clear button.

186
00:17:15,840 --> 00:17:21,380
So here we will declare a button will just destroy what we have in the label.

187
00:17:21,690 --> 00:17:22,720
So it is too easy.

188
00:17:22,750 --> 00:17:29,620
Will just right here, the name of our label, which is Le Point Destroy.

189
00:17:31,320 --> 00:17:37,650
But as you can see, we can't use it because this function doesn't know the destroy variable because

190
00:17:37,650 --> 00:17:46,770
this worry will destroy sorry, the variable name is a local variable for the function B so to fix this

191
00:17:46,770 --> 00:17:50,880
problem we just make this variable as a global variable.

192
00:17:51,330 --> 00:17:57,020
So we just we right here, global then love and we fixed the problem.

193
00:17:57,360 --> 00:18:03,060
So here we have the love is a global variable so we can use it in this function and in the other functions.

194
00:18:03,510 --> 00:18:06,120
So we will see if it works or not.

195
00:18:06,540 --> 00:18:12,350
So for example, here we have high print, we have this high clear we have created.

196
00:18:12,750 --> 00:18:15,530
So, for example, write something else.

197
00:18:15,580 --> 00:18:17,570
So for example, hello brain.

198
00:18:17,730 --> 00:18:19,670
This is our Hanno then clear.

199
00:18:19,690 --> 00:18:23,150
It's clear, which means that it will destroy the label.

200
00:18:24,030 --> 00:18:31,230
So that was the video for today and I see you in the next videos and stay safe, but.
