0
1
00:00:04,955 --> 00:00:05,788
<v Volkan>Hello again,</v>
1

2
00:00:05,788 --> 00:00:09,980
in this lesson we are going to create our third menu item.
2

3
00:00:09,980 --> 00:00:13,740
It will be view menu item and before creating our menu item
3

4
00:00:13,740 --> 00:00:15,010
I want to show you something
4

5
00:00:15,010 --> 00:00:18,037
and I will run our original application.
5

6
00:00:18,037 --> 00:00:20,290
And this is original application here,
6

7
00:00:20,290 --> 00:00:21,320
view menu item is here.
7

8
00:00:21,320 --> 00:00:23,307
As you see now here we have toolbar
8

9
00:00:23,307 --> 00:00:25,150
and status bars.
9

10
00:00:25,150 --> 00:00:29,540
When I click toolbar, now you see I hide my toolbar.
10

11
00:00:29,540 --> 00:00:31,840
And when I click it back, as you see now
11

12
00:00:31,840 --> 00:00:34,160
our toolbar is visible now.
12

13
00:00:34,160 --> 00:00:35,520
So here what we are going to create,
13

14
00:00:35,520 --> 00:00:38,320
we are going to create a different menu item.
14

15
00:00:38,320 --> 00:00:39,850
It's not a normal menu item,
15

16
00:00:39,850 --> 00:00:41,730
we are going to create something else.
16

17
00:00:41,730 --> 00:00:46,490
Let me here, close this one and lets get
17

18
00:00:46,490 --> 00:00:47,790
started to create it.
18

19
00:00:47,790 --> 00:00:49,880
Here, again I will use separator
19

20
00:00:49,880 --> 00:00:51,210
and say view
20

21
00:00:52,220 --> 00:00:53,423
menu, okay.
21

22
00:00:56,840 --> 00:00:58,520
Here, what I need to do,
22

23
00:00:58,520 --> 00:01:01,910
like before I need to use here self dot view
23

24
00:01:03,440 --> 00:01:04,680
equals
24

25
00:01:04,680 --> 00:01:05,930
menu.
25

26
00:01:05,930 --> 00:01:09,380
And here I will say self, and second one will be
26

27
00:01:09,380 --> 00:01:10,370
tear
27

28
00:01:10,370 --> 00:01:11,440
off
28

29
00:01:11,440 --> 00:01:13,150
equals zero.
29

30
00:01:13,150 --> 00:01:14,950
And here what I need to do.
30

31
00:01:14,950 --> 00:01:18,015
First of all I need to use global variables
31

32
00:01:18,015 --> 00:01:20,880
for my status bar and also toolbar.
32

33
00:01:20,880 --> 00:01:22,370
To that here, what I need to do,
33

34
00:01:22,370 --> 00:01:25,890
I need to create here global variables.
34

35
00:01:25,890 --> 00:01:26,723
And I will say
35

36
00:01:28,030 --> 00:01:28,863
show
36

37
00:01:29,920 --> 00:01:31,640
we can, yes lets say
37

38
00:01:31,640 --> 00:01:32,910
show
38

39
00:01:32,910 --> 00:01:34,290
status
39

40
00:01:34,290 --> 00:01:35,123
bar
40

41
00:01:36,520 --> 00:01:39,730
equals true, for the first value.
41

42
00:01:39,730 --> 00:01:40,853
And I will say show,
42

43
00:01:45,874 --> 00:01:47,740
show toolbar.
43

44
00:01:47,740 --> 00:01:48,630
Tool bar
44

45
00:01:49,730 --> 00:01:51,900
also equals true.
45

46
00:01:51,900 --> 00:01:53,780
And after, here what I need to do.
46

47
00:01:53,780 --> 00:01:55,960
I need to use these global variables
47

48
00:01:55,960 --> 00:01:58,260
and I will say here global
48

49
00:01:59,270 --> 00:02:00,103
show
49

50
00:02:01,090 --> 00:02:02,123
status bar.
50

51
00:02:03,790 --> 00:02:05,030
And also global
51

52
00:02:05,970 --> 00:02:07,870
show toolbar.
52

53
00:02:07,870 --> 00:02:09,040
That one.
53

54
00:02:09,040 --> 00:02:13,550
Now what I need to do, I need to create these sub menu items.
54

55
00:02:13,550 --> 00:02:15,680
So that I will say self dot view
55

56
00:02:17,140 --> 00:02:19,280
add check button,
56

57
00:02:19,280 --> 00:02:21,030
not add command.
57

58
00:02:21,030 --> 00:02:23,973
Now for this case we are going to create check buttons.
58

59
00:02:24,810 --> 00:02:27,433
And here what I need to use, I need to use on value.
59

60
00:02:28,420 --> 00:02:31,280
On value equals, I will say,
60

61
00:02:31,280 --> 00:02:32,113
true
61

62
00:02:33,000 --> 00:02:36,620
and after here I need to use off value.
62

63
00:02:36,620 --> 00:02:38,803
Off value is going to be false.
63

64
00:02:39,770 --> 00:02:43,100
And also I am going to use here label.
64

65
00:02:43,100 --> 00:02:47,323
Label is going to be toolbar, okay.
65

66
00:02:50,120 --> 00:02:53,920
Toolbar and after that what I need to use,
66

67
00:02:53,920 --> 00:02:56,540
I need to use variable here.
67

68
00:02:56,540 --> 00:02:58,090
And I will say variable
68

69
00:03:00,580 --> 00:03:02,163
equals show,
69

70
00:03:03,690 --> 00:03:06,563
this is for toolbar, show toolbar.
70

71
00:03:07,490 --> 00:03:10,310
This is the first one and I am not going
71

72
00:03:10,310 --> 00:03:14,245
to command property now, we are going to use it later.
72

73
00:03:14,245 --> 00:03:18,160
Also now, let's press Control + D here.
73

74
00:03:18,160 --> 00:03:20,970
Self dot view, add check button again,
74

75
00:03:20,970 --> 00:03:24,770
on value will be true and this one will be
75

76
00:03:24,770 --> 00:03:26,290
status bar, okay.
76

77
00:03:26,290 --> 00:03:30,860
Status bar and that one is going to be
77

78
00:03:30,860 --> 00:03:33,033
show status bar, okay.
78

79
00:03:34,420 --> 00:03:36,430
And if I run my application now,
79

80
00:03:36,430 --> 00:03:37,843
actually before that what we need to do here,
80

81
00:03:37,843 --> 00:03:41,923
we need to say self dot add cascade,
81

82
00:03:44,010 --> 00:03:44,950
and here
82

83
00:03:46,160 --> 00:03:47,880
I need to say for the label
83

84
00:03:48,770 --> 00:03:50,320
equals
84

85
00:03:50,320 --> 00:03:51,153
view,
85

86
00:03:52,060 --> 00:03:54,350
and after that here I will say
86

87
00:03:54,350 --> 00:03:55,183
menu
87

88
00:03:56,170 --> 00:03:57,003
equals
88

89
00:03:57,003 --> 00:03:58,450
self dot
89

90
00:03:58,450 --> 00:03:59,283
view.
90

91
00:04:00,520 --> 00:04:03,503
Now our menu is ready, if I run my application again.
91

92
00:04:04,460 --> 00:04:07,870
And as you see now our menu item is here, view.
92

93
00:04:07,870 --> 00:04:10,763
Now you see, we check them.
93

94
00:04:11,710 --> 00:04:16,710
And when I click it back, it's not checked, unchecked now.
94

95
00:04:16,720 --> 00:04:19,181
And this is how we can create
95

96
00:04:19,181 --> 00:04:22,850
check button menu items for our applications.
96

97
00:04:22,850 --> 00:04:23,850
See you in the next.
