1
00:00:00,570 --> 00:00:01,360
Hello, everyone.

2
00:00:01,680 --> 00:00:07,680
And this video, I will show you how you can create a button in which using you can, then you will,

3
00:00:07,680 --> 00:00:08,940
Puckett's in your up.

4
00:00:09,240 --> 00:00:18,300
So the first thing that we need to do is to create the I'm doing the as always, tell from the to import

5
00:00:18,720 --> 00:00:19,290
everything.

6
00:00:20,190 --> 00:00:22,830
Then we'll make some editing some.

7
00:00:23,190 --> 00:00:34,310
So it will create and it's so the.

8
00:00:36,810 --> 00:00:40,080
So here if get it for me give it to me.

9
00:00:40,140 --> 00:00:46,670
Groot's equal so that equals the function t.k.

10
00:00:48,000 --> 00:00:50,010
So we will change the background color.

11
00:00:50,010 --> 00:01:03,200
For example rudes boyens configure here b B equals six zeros to make it look.

12
00:01:03,780 --> 00:01:06,390
Then we change the title.

13
00:01:07,050 --> 00:01:11,300
Rudes points tighter here.

14
00:01:12,760 --> 00:01:16,330
Up then the icon

15
00:01:19,390 --> 00:01:30,270
here gave its logo on Eco, then we will change the geometry of the Earth to give it a constant size.

16
00:01:31,270 --> 00:01:37,800
So geometry here, five hundred by five.

17
00:01:39,310 --> 00:01:47,550
I did it make it as a main loop to root Boyte main loop.

18
00:01:48,270 --> 00:01:51,820
OK, we will see our function to our window.

19
00:01:51,850 --> 00:01:53,110
Sorry, this is our window.

20
00:01:53,120 --> 00:01:54,110
It is too empty.

21
00:01:54,460 --> 00:02:00,870
So the first thing that we need to do as we did with labels, we need to create the lid, the button,

22
00:02:01,090 --> 00:02:03,160
then we will buckets on the window.

23
00:02:03,430 --> 00:02:08,580
So we will you Ackermans here create the button.

24
00:02:10,540 --> 00:02:14,560
So to create a button frosting does we have to do as always.

25
00:02:14,560 --> 00:02:24,160
We will create, we create funnybone, we give it the name but for example equals to to create a button.

26
00:02:24,160 --> 00:02:25,970
We would use the function button.

27
00:02:26,500 --> 00:02:33,190
So button in parentheses there is always parameters as we do with labels.

28
00:02:33,220 --> 00:02:38,300
So the first parameter is the name of our which is root.

29
00:02:38,800 --> 00:02:41,920
So there is a lot of those two root.

30
00:02:42,250 --> 00:02:47,320
Then here we give the text that we want to see on our button.

31
00:02:47,620 --> 00:02:52,460
So here we can type text equal.

32
00:02:53,200 --> 00:02:58,450
So for example, we make it click, click mean.

33
00:02:58,930 --> 00:03:03,820
This is the text that we see on the button will do nothing for the moment.

34
00:03:04,060 --> 00:03:08,380
But this button, it looks after that we will do the editing on it.

35
00:03:08,380 --> 00:03:13,030
So much point back then, the balances.

36
00:03:14,440 --> 00:03:16,160
As you can see, this is our button.

37
00:03:16,930 --> 00:03:25,300
So the first thing that I want you to see, we can change the background and the foreground of the button.

38
00:03:25,570 --> 00:03:30,490
We can change the font type of the text, which is click me, for example.

39
00:03:30,730 --> 00:03:31,750
We can do a lot of things.

40
00:03:31,750 --> 00:03:34,660
So I will show you some of these parameters that we can do.

41
00:03:35,050 --> 00:03:37,810
So here we can change, for example, in the background.

42
00:03:37,810 --> 00:03:47,170
So B.G. for background equals we give it the color, for example, and then the for the foreground feature

43
00:03:47,290 --> 00:03:48,310
of equal.

44
00:03:49,840 --> 00:03:55,480
I don't know, for example, it doesn't look good, but just for this example.

45
00:03:56,050 --> 00:04:01,960
So this is this is our button with these colors we can change.

46
00:04:01,960 --> 00:04:04,090
As I told you, it can change the font type.

47
00:04:04,090 --> 00:04:07,170
So we will use the function font as before.

48
00:04:07,180 --> 00:04:09,220
So font equals here.

49
00:04:09,220 --> 00:04:17,740
For example, I will take another font which called Andred, for example, on Droid, then I will give

50
00:04:17,740 --> 00:04:19,770
it the size of twenty.

51
00:04:20,680 --> 00:04:24,870
So we will see as here we have our bottom Klima.

52
00:04:25,060 --> 00:04:27,370
So there is a function called state.

53
00:04:27,730 --> 00:04:31,230
This function will control the state of our button.

54
00:04:31,250 --> 00:04:36,970
So in this case, for example, the function, the button is in the state normal because we can click

55
00:04:36,970 --> 00:04:37,150
it.

56
00:04:37,750 --> 00:04:45,370
But in some cases we want to, we want to add to our button to be clickable for just one type, for

57
00:04:45,370 --> 00:04:45,780
example.

58
00:04:46,090 --> 00:04:51,600
So we will give it state in the first state is enabled.

59
00:04:51,760 --> 00:04:53,530
So we what we want to disable it.

60
00:04:53,780 --> 00:04:55,840
So to do this, we will use the function.

61
00:04:55,840 --> 00:05:04,210
As I told you, state equals disable the world, which means that this function in this button will

62
00:05:04,210 --> 00:05:04,840
be disabled.

63
00:05:05,140 --> 00:05:09,250
So we see here that we can click it because it is disabled.

64
00:05:09,760 --> 00:05:15,100
So that's what I can say for the buttons.

65
00:05:15,100 --> 00:05:16,360
We can change here.

66
00:05:16,360 --> 00:05:23,620
We have the text, foreground background, the phone text and the default type sorry, and the size.

67
00:05:24,160 --> 00:05:26,440
And there is another thing that I didn't talk about it.

68
00:05:26,650 --> 00:05:33,270
For example, if we want to change, I would need this if we want to change this, the width and the

69
00:05:33,280 --> 00:05:34,300
height of our button.

70
00:05:34,660 --> 00:05:37,000
So we will always use the functions.

71
00:05:37,510 --> 00:05:47,140
But X equals, for example, we will give it to charity then for the.

72
00:05:47,830 --> 00:05:48,640
But why.

73
00:05:49,660 --> 00:05:56,460
But X but X will change the the width and the way we change the height.

74
00:05:56,770 --> 00:06:02,890
So for example by the way we give it twenty so we will see if it is OK.

75
00:06:03,100 --> 00:06:08,130
As you can see here we have the button is bigger than before because we changed here the width and,

76
00:06:08,680 --> 00:06:09,390
and the height.

77
00:06:10,210 --> 00:06:11,800
So that's always I can see.

78
00:06:12,140 --> 00:06:17,500
All the buttons in the next video, they will show you how we can create a command for this button.

79
00:06:17,900 --> 00:06:22,730
So if we will click and we will see something create a label.

80
00:06:23,690 --> 00:06:28,140
So thanks for watching and I'll see you in the next video.

81
00:06:28,280 --> 00:06:29,780
And stay safe by.
