1
00:00:00,450 --> 00:00:01,230
Hello, everyone.

2
00:00:01,260 --> 00:00:06,480
Today, I will show you how you can create a fine dialogue using digital.

3
00:00:06,780 --> 00:00:13,650
So if we have, for example, a folder or a folder that has some pictures and we want, for example,

4
00:00:13,650 --> 00:00:17,710
to take this picture and put it in our up, how do we do this?

5
00:00:18,150 --> 00:00:25,290
So the first thing I will do, I will show you how you can take the path of how you can open a dialogue

6
00:00:25,290 --> 00:00:28,960
file to see where we can find this picture.

7
00:00:28,980 --> 00:00:30,600
After that, we will put it in our up.

8
00:00:30,900 --> 00:00:36,050
So the first thing that we have to do, we have to use the chicken to use it.

9
00:00:36,240 --> 00:00:39,800
And not just from the digital library, which is the file dialogue.

10
00:00:39,810 --> 00:00:49,740
So from what I'm sorry, but I'm taking to import file.

11
00:00:49,980 --> 00:00:58,470
They are not where we import the hint or two from taking to import everything.

12
00:00:59,100 --> 00:01:03,880
No, the first thing that we have to do is to create the root root equal.

13
00:01:04,410 --> 00:01:04,810
Teekay.

14
00:01:05,490 --> 00:01:07,320
No, I won't.

15
00:01:07,350 --> 00:01:11,660
I won't put it for the moment as mainly because I don't want to open it for the moment.

16
00:01:11,880 --> 00:01:13,030
I will let it like this.

17
00:01:13,800 --> 00:01:18,150
So what we want to do is to do it when I want that.

18
00:01:18,150 --> 00:01:24,780
When you're go on the program and on the program, I will the program will show me a window that will

19
00:01:24,780 --> 00:01:27,420
ask me to choose a file.

20
00:01:27,600 --> 00:01:29,880
For example, in this case, we will choose a picture.

21
00:01:30,180 --> 00:01:33,840
After that, we will use this picture for our OK, so do this.

22
00:01:33,840 --> 00:01:35,700
We will use the function.

23
00:01:36,240 --> 00:01:38,730
For example, a function is Ruth.

24
00:01:38,730 --> 00:01:42,270
That file name equals here.

25
00:01:42,270 --> 00:01:51,660
We will use the file to find out, as we said, using taking the selfie dialogue that as here we have

26
00:01:51,660 --> 00:01:55,560
asked by name this this function will help us.

27
00:01:55,560 --> 00:02:03,090
This function will open the window that we ask which file that we want and which type, etc. So he will

28
00:02:03,090 --> 00:02:04,710
type what we want.

29
00:02:04,710 --> 00:02:08,630
For example, if you if we will have a new window.

30
00:02:08,850 --> 00:02:11,390
So this window should have a title.

31
00:02:11,490 --> 00:02:13,760
So for us, we will put it here together.

32
00:02:13,770 --> 00:02:21,570
For example, I would put it, for example, opening picture when we will have a window, as we did

33
00:02:21,570 --> 00:02:23,190
with rudes, with tickin.

34
00:02:23,610 --> 00:02:31,230
If we have that data and we change it later, if we have if we do this, we we will have a new title

35
00:02:31,230 --> 00:02:33,060
for our up the same thing here.

36
00:02:33,180 --> 00:02:38,750
This data is for the window that will ask us to choose to choose the picture.

37
00:02:38,800 --> 00:02:39,080
Sorry.

38
00:02:39,610 --> 00:02:45,240
So the first parameter is this one data then second parameter is defined times.

39
00:02:46,200 --> 00:02:51,650
Which types do we want to to open and put it in our program, etc..

40
00:02:51,960 --> 00:02:55,110
So we will make it like this file types.

41
00:02:56,250 --> 00:02:59,520
And here we open this parenthesis inside the parentheses.

42
00:02:59,540 --> 00:03:02,030
We will make any type we want.

43
00:03:02,040 --> 00:03:08,750
For example, if you have to if we want to select two types of images, for example, it will take PMG

44
00:03:08,790 --> 00:03:09,450
and GBG.

45
00:03:09,870 --> 00:03:13,320
So to do this, we have to put every type in parentheses.

46
00:03:13,330 --> 00:03:17,130
So this this is the extended parenthesis.

47
00:03:17,130 --> 00:03:22,050
And here we will make another one, this one for for example, this for the PMG.

48
00:03:22,050 --> 00:03:25,080
Then you may cover then the second one for GPG.

49
00:03:25,320 --> 00:03:31,080
If you want to use a lot and other types, we can just add to come up, etc..

50
00:03:31,350 --> 00:03:37,930
So for the moment when it was just this two one and this is one from the beginning and one for LGBT.

51
00:03:38,340 --> 00:03:41,970
So inside this parenthesis there is two parameters that we have to do.

52
00:03:42,270 --> 00:03:43,650
The first thing is the title.

53
00:03:43,650 --> 00:03:46,430
I will show you where we will find this data.

54
00:03:46,800 --> 00:03:51,090
I can show you for the moment because we didn't finish the program.

55
00:03:51,480 --> 00:03:53,220
So I'm going to make it.

56
00:03:53,220 --> 00:03:55,700
For example, this would be in She Fired Me.

57
00:03:55,830 --> 00:04:00,060
This is the title of which time we want you to open.

58
00:04:00,870 --> 00:04:05,840
And here we would write the time that we want, which is that being.

59
00:04:06,180 --> 00:04:11,550
But before that, we have to write, for example, if we want to open a specific photo or picture or

60
00:04:11,550 --> 00:04:12,300
something like this.

61
00:04:13,430 --> 00:04:17,190
So here we will write the name of this picture or something like this.

62
00:04:17,190 --> 00:04:20,700
But if we don't, there is no specific thing we will make.

63
00:04:20,700 --> 00:04:23,780
Start means everything, everything that we want to see.

64
00:04:23,830 --> 00:04:28,650
After that we had we will open it or or I don't know, you can use it wherever you want.

65
00:04:29,100 --> 00:04:33,670
So the second, if I say that we want, is the DPG.

66
00:04:33,840 --> 00:04:41,970
So we would just write here the title, which is GPG files or file.

67
00:04:42,160 --> 00:04:45,120
It doesn't matter because it is just the data.

68
00:04:45,450 --> 00:04:54,180
Then here we will make everything that GBG, if he wants, for example, if you want to open everything

69
00:04:54,510 --> 00:04:59,480
and we every time we have, we will just start making it start.

70
00:04:59,490 --> 00:04:59,760
That's.

71
00:04:59,830 --> 00:05:05,630
That means everything, every name that every time, but for the moment, I don't want to use it.

72
00:05:05,650 --> 00:05:06,910
I will listen just like this.

73
00:05:07,450 --> 00:05:14,800
We will be able to open just the G.P.A. and GPG if we get on our program, you will see there is a problem

74
00:05:14,800 --> 00:05:18,640
here and we see it while.

75
00:05:21,620 --> 00:05:24,110
But the longer and that is.

76
00:05:27,740 --> 00:05:37,820
I will restart it is always a problem, which is I think that I forget here, but I would OK, it is

77
00:05:37,820 --> 00:05:38,310
working.

78
00:05:38,810 --> 00:05:44,440
No, as you can see, we have this is detectives, as I told you about somebody here, we have been

79
00:05:44,600 --> 00:05:45,050
fired.

80
00:05:45,050 --> 00:05:52,180
So here this is the type that we want that if we want the GPG, we just Changizi, for example, GPG,

81
00:05:52,460 --> 00:05:54,650
we have these pictures are in jeopardy.

82
00:05:54,660 --> 00:05:57,190
So it doesn't matter if we do this.

83
00:05:57,200 --> 00:06:00,690
We have we will see nothing because we didn't do nothing.

84
00:06:00,710 --> 00:06:01,670
Do just open it.

85
00:06:01,670 --> 00:06:04,610
And we just took the path of this picture.

86
00:06:04,790 --> 00:06:11,630
If you want to see what's really dysfunction, if we will print it out, who you will see by yourself.

87
00:06:11,630 --> 00:06:14,810
Preened wrote that file name.

88
00:06:15,500 --> 00:06:17,120
You will see what we have.

89
00:06:17,120 --> 00:06:20,840
We have, for example, if I will choose this one, you will see here.

90
00:06:20,840 --> 00:06:22,910
This is the path of the picture.

91
00:06:22,910 --> 00:06:28,700
This is the folder and the and the folder projects and the picture.

92
00:06:29,210 --> 00:06:37,580
So as you can see, we can use this thing and we can use this path to open the picture and put it in

93
00:06:37,580 --> 00:06:38,080
our up.

94
00:06:38,180 --> 00:06:47,200
As you can see, when we use the function to the library image image, sorry, we use the path to open

95
00:06:47,210 --> 00:06:52,530
a picture so we can use this the same path to open a picture and put it inside our up.

96
00:06:52,910 --> 00:06:53,960
So we will do this.

97
00:06:53,960 --> 00:07:00,380
The first thing that we have to do is to make a button, because I don't want that where I when I run

98
00:07:00,380 --> 00:07:03,350
the program, this this picture opens directly.

99
00:07:03,350 --> 00:07:06,680
As you can see, this is the picture that we chose in here I forgot to tell you about.

100
00:07:06,890 --> 00:07:09,530
This is often picture, as you can see here.

101
00:07:10,040 --> 00:07:13,550
So I will do I will make a button in the route.

102
00:07:13,730 --> 00:07:22,250
So I want that when I press or when I click the button, I've said that the will you I will have another

103
00:07:22,250 --> 00:07:23,930
window to ask me for the phone.

104
00:07:24,290 --> 00:07:33,650
So to do this, we will have Will just so we will just create the button.

105
00:07:33,980 --> 00:07:41,120
I will call it for example, open, open equal for example here button.

106
00:07:42,830 --> 00:07:44,480
We will put it in the route.

107
00:07:44,930 --> 00:07:55,140
After that we will make a text which says OK then I will make somebody on X.

108
00:07:57,130 --> 00:08:08,430
But I will give it, for example, 40 the but why a ten then after that I will back it.

109
00:08:09,760 --> 00:08:16,120
But so often what I am doing here, that bunch and the parenthesis.

110
00:08:16,360 --> 00:08:22,960
So here we have to make a comment because as I said, I want that if I click in this button, I would

111
00:08:23,140 --> 00:08:28,730
if you decide, which means I will, I will create a window that will ask me to choose to fight.

112
00:08:29,020 --> 00:08:35,790
So here I will, for example, open, open, big for open picture.

113
00:08:36,160 --> 00:08:49,360
So he will take all this line control X and we will define a function def open mic that here we have

114
00:08:49,360 --> 00:08:52,630
the parenthesis that Collins and this one, this line.

115
00:08:54,100 --> 00:08:55,540
I think that it works like this.

116
00:08:57,100 --> 00:08:59,020
I didn't watch it.

117
00:08:59,050 --> 00:09:02,910
Now I have to put it in the main loop like this.

118
00:09:03,250 --> 00:09:04,600
So here we have.

119
00:09:05,810 --> 00:09:16,520
This is it is too small if we is like this, sorry, I it doesn't matter if I click here you will have

120
00:09:16,520 --> 00:09:21,270
this window I would make is size to make it very make it better.

121
00:09:21,680 --> 00:09:25,370
I will give it a geometry.

122
00:09:27,380 --> 00:09:32,850
I will give it 400 by 400 by five.

123
00:09:33,830 --> 00:09:36,290
So here we would have this window.

124
00:09:36,830 --> 00:09:40,850
Now I want this, this, this button in the bottom here.

125
00:09:41,240 --> 00:09:42,690
So what should we do?

126
00:09:42,710 --> 00:09:46,940
I have I have to use something I didn't tell you about it in the frame.

127
00:09:47,240 --> 00:09:47,980
It doesn't matter.

128
00:09:47,990 --> 00:09:48,950
We don't use it a lot of.

129
00:09:48,980 --> 00:09:55,850
But in this case, I have to put a frame here so that if we have frame here, we can have the button,

130
00:09:55,850 --> 00:09:58,730
the button here in the bottom of our window.

131
00:09:59,030 --> 00:10:03,500
So to do this, we have just to create a frame as we created a lot of things like labels.

132
00:10:03,830 --> 00:10:04,690
It's very easy.

133
00:10:05,060 --> 00:10:09,170
So we make it like this will give us a new frame that there is a function frame.

134
00:10:09,560 --> 00:10:12,740
We will put it in the woods, then there is nothing else.

135
00:10:12,740 --> 00:10:15,980
We will just choose the width and the height.

136
00:10:16,160 --> 00:10:23,440
We will make it like the the window as we have so that we will push the button down.

137
00:10:23,750 --> 00:10:38,060
So here on the stage, the with will put it 400 as the window and for the high I, I will give it four

138
00:10:38,060 --> 00:10:45,980
hundred and fifty now, so I will pack it here, frame that.

139
00:10:46,190 --> 00:10:48,580
But as you can see this is the frame.

140
00:10:49,100 --> 00:10:57,020
No, you can see that the button is in the bottom of the hour because we have frame here.

141
00:10:57,020 --> 00:11:00,880
If we want to see it very clearly, I will change the color so that you can see it.

142
00:11:01,190 --> 00:11:05,820
So I will make it big equals red just to see it.

143
00:11:06,440 --> 00:11:11,020
So as you can see, this is the frame that we have created in color red.

144
00:11:11,300 --> 00:11:15,890
But if we don't use it, we will just I need just to push the button.

145
00:11:15,920 --> 00:11:18,370
I don't need it to do to another thing.

146
00:11:18,650 --> 00:11:27,320
So now what should we do is we have just to create or two to create the we have to the first thing that

147
00:11:27,320 --> 00:11:30,710
you have to do is to import the library.

148
00:11:30,730 --> 00:11:38,480
So from the and import image to sorry.

149
00:11:38,480 --> 00:11:40,690
Not the image image.

150
00:11:40,820 --> 00:11:48,100
Teekay then image as they told you about image.

151
00:11:48,500 --> 00:11:53,710
No, you can see that we have this to the level that we can.

152
00:11:53,720 --> 00:11:56,310
We use the library below as always.

153
00:11:56,780 --> 00:12:04,370
So now what should we do is just just to use this object to open a file using the bus.

154
00:12:04,370 --> 00:12:06,860
That's when this function return.

155
00:12:07,280 --> 00:12:15,290
So we will use the return of this function as a bus to open the picture as we will transform it by using

156
00:12:15,320 --> 00:12:16,070
imagistic.

157
00:12:16,220 --> 00:12:20,840
After that, we will park in the window, which we will put it in the frame.

158
00:12:20,840 --> 00:12:22,010
I will show you how to do this.

159
00:12:22,850 --> 00:12:28,340
So here we have the first thing that we have to do is to open the image so and will call it, for example,

160
00:12:28,400 --> 00:12:29,450
picture.

161
00:12:32,170 --> 00:12:36,160
Picture equals, for example, image.

162
00:12:37,900 --> 00:12:40,820
This is the object that's popping.

163
00:12:42,150 --> 00:12:45,520
And here we will put the past, as we said, this route.

164
00:12:45,670 --> 00:12:47,410
That's my day when we printed one.

165
00:12:47,410 --> 00:12:50,270
Should we have seen that it was a path?

166
00:12:50,380 --> 00:12:54,400
So we would put it just here to to open that image that we want.

167
00:12:54,850 --> 00:12:58,730
So here we have ruled that by name.

168
00:12:59,260 --> 00:13:04,870
So if we put this one, this function open, we'll have the path, which is what we choose in here.

169
00:13:05,290 --> 00:13:12,880
So in this case, we have open an image and we put it in the Bible here, you know, if we want to put

170
00:13:12,880 --> 00:13:14,860
it in the in the up.

171
00:13:14,860 --> 00:13:21,610
So we have just to use it in the the function, which is the image, T.J. So we will make it like this,

172
00:13:21,610 --> 00:13:35,240
for example, the new pick or make it just new here we have the image to image T.J..

173
00:13:35,280 --> 00:13:38,830
Sorry, T.J., that photo image.

174
00:13:39,820 --> 00:13:43,300
And here we will post the picture that we want, which is this one.

175
00:13:44,020 --> 00:13:51,330
So if we do this after this, we have just to put it in the label, which is labeled equals label.

176
00:13:52,000 --> 00:13:56,070
But before that, we put it, we have put it the label inside the root.

177
00:13:56,290 --> 00:14:04,570
But now we want to put the we want that the label will be upside the the frame that we have created

178
00:14:04,570 --> 00:14:07,170
because we don't need we don't need the frame for the moment.

179
00:14:07,360 --> 00:14:10,900
So we will put it just like this in the frame then.

180
00:14:10,900 --> 00:14:14,860
Here we have we have we don't we don't want to make a text.

181
00:14:15,100 --> 00:14:16,900
So we need an image.

182
00:14:17,200 --> 00:14:23,350
And here we put in you after that it buckets so near that, but.

183
00:14:25,100 --> 00:14:30,570
Not bust back like this, so we will see if it works or not.

184
00:14:31,070 --> 00:14:32,810
So we have room for this one.

185
00:14:33,560 --> 00:14:35,620
As you can see, there is a new era here.

186
00:14:35,780 --> 00:14:37,400
Why not pass?

187
00:14:37,790 --> 00:14:42,900
Not new, which is we would love to park the label, not the image.

188
00:14:43,310 --> 00:14:46,250
So here we have like this.

189
00:14:46,940 --> 00:14:50,900
So we ran it and we have here we selected this one.

190
00:14:51,970 --> 00:14:53,660
It is not opening.

191
00:14:53,690 --> 00:14:53,960
Why?

192
00:14:53,970 --> 00:14:55,530
Because I know why.

193
00:14:55,550 --> 00:14:58,670
Because the problem is in size.

194
00:14:59,390 --> 00:15:03,850
Because of we have the size of the picture is too big in this one.

195
00:15:03,860 --> 00:15:05,770
In this case, we have to resize it.

196
00:15:05,780 --> 00:15:09,550
We have to make it small so that we can see it in the up.

197
00:15:09,920 --> 00:15:14,120
So to do this, we have just to use the functions that we have.

198
00:15:14,120 --> 00:15:15,540
For example, here we have a picture.

199
00:15:15,970 --> 00:15:17,660
No, I will make a picture.

200
00:15:17,670 --> 00:15:19,290
For example, I will decide that.

201
00:15:19,310 --> 00:15:23,410
I will put it in another in another variable.

202
00:15:23,630 --> 00:15:30,680
So before that, I want to tell you that there is something to talk about if we will use frames and

203
00:15:30,800 --> 00:15:38,480
if we want not frames, if we want to put pictures inside, inside the bus, we will create the picture

204
00:15:38,480 --> 00:15:44,400
inside another another function, which is in this case, this picture is a local variable.

205
00:15:44,420 --> 00:15:45,320
It is not global.

206
00:15:45,560 --> 00:15:48,970
So we have to put it global so that we can use it in the lead here.

207
00:15:49,310 --> 00:15:55,100
So we will make it just like this just here global.

208
00:15:57,650 --> 00:16:08,150
Then we have the picture, which is new, was built on a globe, but which is this one global view,

209
00:16:08,150 --> 00:16:11,870
which is this what I will see if it works this time.

210
00:16:12,620 --> 00:16:14,050
You can see this is the picture.

211
00:16:14,060 --> 00:16:19,030
But as you can see, we can see the whole picture because it is the size is too big.

212
00:16:19,040 --> 00:16:20,120
So we have to realize it.

213
00:16:20,120 --> 00:16:24,520
We will put it in the same size of the of our window so that we can see it.

214
00:16:25,010 --> 00:16:30,740
So we will use the function, which is this one picture.

215
00:16:31,610 --> 00:16:36,410
But you size it really size

216
00:16:38,510 --> 00:16:41,100
that here we will put the functions that we want.

217
00:16:41,450 --> 00:16:47,660
So what we what we have here, we have the we will change.

218
00:16:48,000 --> 00:16:49,800
We will give it the same thing.

219
00:16:49,820 --> 00:16:50,240
Not here.

220
00:16:50,240 --> 00:16:58,570
Not we would at the same the same size of the frame because we want to put it out outside the frame.

221
00:16:58,850 --> 00:17:03,080
So we would put it like this one, where is its size.

222
00:17:03,080 --> 00:17:09,100
So he will put it the size, which is 400 by 450.

223
00:17:09,830 --> 00:17:20,670
Then the second parameter will be as much as we did before he image that on Depardieu's.

224
00:17:21,080 --> 00:17:26,990
So in this case, we have decided the picture and we need just to put it here.

225
00:17:26,990 --> 00:17:31,490
For example, I would put it in the new button.

226
00:17:31,490 --> 00:17:39,150
You put it are are big resize resized picture equals this one.

227
00:17:39,560 --> 00:17:45,350
So if we want to put this new picture inside Lambourne, we have just to put it here.

228
00:17:45,390 --> 00:17:49,390
The first thing we have to make it like this to make it.

229
00:17:49,390 --> 00:17:52,130
You ready to put it in the center up here?

230
00:17:52,130 --> 00:17:54,320
We have this one and this new.

231
00:17:55,250 --> 00:17:56,600
I think that that's it.

232
00:17:57,020 --> 00:17:58,940
So here we have this one.

233
00:17:58,940 --> 00:18:00,320
We open this picture.

234
00:18:00,530 --> 00:18:07,250
As you can see, the picture is resize it and put it in and it is put in our window.

235
00:18:07,470 --> 00:18:12,920
So if we want to choose another picture, as you can see, we will just press here and this picture,

236
00:18:12,920 --> 00:18:14,250
for example, et cetera.

237
00:18:14,900 --> 00:18:17,180
So that was for today.

238
00:18:17,660 --> 00:18:19,370
I hope that you like it.

239
00:18:19,370 --> 00:18:21,940
And I see you in the next video.

240
00:18:22,190 --> 00:18:22,800
Stay safe.

241
00:18:23,220 --> 00:18:23,630
All right.
