WEBVTT 1 00:00:00.212 --> 00:00:02.279 line:15% Hi guys, and welcome back. 2 00:00:02.279 --> 00:00:05.280 line:15% In this video, we're going to be adding another menu, 3 00:00:05.280 --> 00:00:08.036 just for a quick about page in our application. 4 00:00:08.036 --> 00:00:11.883 Let's go down to the bottom of our file 5 00:00:11.883 --> 00:00:15.980 and we're gonna add another menu as well as the file menu. 6 00:00:15.980 --> 00:00:19.073 We're gonna do help menu and it's gonna be another tk.menu 7 00:00:19.073 --> 00:00:20.651 inside of the menu bar. 8 00:00:20.651 --> 00:00:24.744 And then, we will do menubar.add_cascade 9 00:00:24.744 --> 00:00:28.024 and the menu is going to be the help menu 10 00:00:28.024 --> 00:00:31.763 and the label is going to be help. 11 00:00:32.700 --> 00:00:35.760 Then, down here, we will also add a command. 12 00:00:35.760 --> 00:00:40.435 So the help_menu.add_command, the label will be about 13 00:00:40.435 --> 00:00:44.377 and the command is show_about_info. 14 00:00:45.440 --> 00:00:48.100 So, this is a new function we're gonna create just now. 15 00:00:48.100 --> 00:00:49.355 Let's create it up here. 16 00:00:49.355 --> 00:00:53.734 Show_about_info and it's just going to launch a message box. 17 00:00:53.734 --> 00:00:55.726 So we will say showinfo. 18 00:00:55.726 --> 00:00:57.983 The title is going to be about 19 00:00:57.983 --> 00:01:02.039 and the message is going to be something like this. 20 00:01:02.039 --> 00:01:06.286 All right, so just a simple message that can be shown there. 21 00:01:06.286 --> 00:01:08.590 And we will use this to show you 22 00:01:08.590 --> 00:01:10.140 how to define multiple menus. 23 00:01:10.140 --> 00:01:12.010 You can see them up here, file and help. 24 00:01:12.010 --> 00:01:14.970 And when you click on it, you get the about. 25 00:01:14.970 --> 00:01:18.957 Notice that whenever you add a help menu in Mac, 26 00:01:18.957 --> 00:01:22.524 you also get this search, this comes by default with MacOS 27 00:01:22.524 --> 00:01:25.746 and allows you to do searches for other menu items 28 00:01:25.746 --> 00:01:27.228 inside your application. 29 00:01:27.228 --> 00:01:28.940 It can be pretty handy. 30 00:01:28.940 --> 00:01:31.270 But, if you don't get that because you're not using Mac, 31 00:01:31.270 --> 00:01:32.952 that's okay, don't worry about it. 32 00:01:32.952 --> 00:01:36.068 This is how you can create multiple menus 33 00:01:36.068 --> 00:01:37.591 in your application. 34 00:01:37.591 --> 00:01:39.610 Just copy what we had already, 35 00:01:39.610 --> 00:01:41.039 add a new one and it just appears there. 36 00:01:41.039 --> 00:01:43.925 And also, how you can show an info box 37 00:01:43.925 --> 00:01:46.013 with the messagebox.showinfo. 38 00:01:47.336 --> 00:01:49.663 Thanks for joining me in this video, 39 00:01:49.663 --> 00:01:51.273 line:15% I'll see you in the next one.