Create Multiple Window Frames with Tkinter - Python

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys i'm gideon welcome to my channel so in today's video we are going to create three pages and on these three pages you are going to have buttons on it such a way down click on for example you click on a button on page one and stick you to page 2 or page 3 so let's quickly get into the video so let's import what we need for this video so let's say from ticking time import all okay so let's name our window so you can limit whatever it's okay for you i'm limiting to window give it a size no configure let's see as well so let's copy this let's change this to column configure so column so here we go so let's just run it and see window dots and then see what we got okay so yes as you can see our window is too small which means yeah we have to like basically be maximizing every time so you don't want to be maximizing every time so let's create let's use windows state which is which will automatically maximize our window anytime we launch our application so let's say okay let's see so i will do automatically maximizing so i need to put you have to be maximizing it every time so now let's quickly so i'm leaving my first page guys we are creating three pages from them name your page first page anything of your choice i'm naming my page one so let's assign a page to our frame in our window so automatically software so since okay so frame so then my last one h3 okay all right okay so now let's put our frames on our page so for frame okay we have to update one sorry okay agreed so with the rights also supposed to be frame dot okay so say row should be classes 0 okay so we need sticky so with the stick we want our frame to automatically maximize any time the window maximize as well so the i feel movement's mass every time maximum as i would so okay now let's look at this so we have three pages and with these three pages which page will you want to show first anytime you launch your application so let's say my page one is my home page i want my opinion to show first any time i launch my application so let's create function that will allow that will show whatever page we desire to show first so let's define so as so i'm defining show frame i'm using show free let's add one argument free so frame sorry frame dot tk this okay so now you can go ahead and specify which page you want to show first so i want to show page one first so let's say show frame page one all right so now let's create our pages let's put something on our pages so i'm just start with page one so let's make it a little fun let's create some later login form not that much something later sorry create a login form on our page one so i will click login ticker to page two so we need a label so page one label okay so put it on a page one will give you some text so username test username and some font so okay um okay let's choose area this is just uh okay i don't need you now okay show you some font size so let's say 15. and let's make it bold here we go so let's place it so i said x is equal to a little bit in the mean day let's take a look oh no it's not showing okay it's not supposed to be the there label okay boom so we got it so let's put some entry in front of it some entry so page one entry here we go let's put it on playground as well don't need okay i need entry so let's see funny thing about places you just have to think of the right value to place it you don't want to be maximizing be going becoming changing the values all that time so like let's say 170 and okay why 90 okay let's see it should work no that little boy is a little bit higher so let's bring down let's see one 6 you should be okay perfect so let's quickly copy this and create our password label and entry as well i just have to change some few things okay okay so we name this password and i think the font size should it's okay so okay let's see so let's maintain okay let's see okay supposed to be on the same line with xrls and i think this let's say this is like like i said about this frame suppose you have to get the right value but you don't want to be maximizing be going it coming so let's say okay 170 and 150 okay okay that's higher is what i was preventing having to be going coming okay let's add some five and see boom that's perfect so let's create some button so let's say page page one button menu the button to switch to our next page so that's what i'm doing now so button okay page one okay okay i'm gonna need some text let's copy this so okay so let's change this to one button so here we go again this time around i have to get the effect i don't have to go and come back again okay 20 is a master let's see i have to get perfect boom so i got it so we so right now it's not going to do anything now we need to put a function in it so first let's create a second page first so now when you click on the login takes you to your second page so let's get our second page goal so page two here we come let's name our page two time time mass pen so let's just create something just to show so let's just create a label and we need to click 90 thing so okay page 2 label okay so this time is going to be page two because you're on page two okay so that's i say welcome to okay let's pack it let's place it so that's really good too so we got our page two so let's go back to our page one and inside our button let's give it a command so let's say command lambda show frame page two okay okay so let's see no i got something wrong here take my position command okay i think i placed my command in the wrong place oh no that's bad that was very bad so let's go okay boom so yeah now page two looks like it's like a baby maybe guys don't worry let's make it look a little bit fun not that much fun do so okay let's make it dirty okay so let me quickly also do something you can't even you can't change let's say you want to change the background of the page let's change the background the page so let's say page 2 dot config just like we change config say background it's a gray or yellow a little bit too bright so let's see so let's see here we go so we are in our page two now so okay so let's create a button this page too so that when you click on that button it takes you to any page you want to grasp so let's create a page three at page three as well so let me copy this so here we go page 3 and [Music] let's see agree welcome to page three okay so we need a button in page two okay so here becomes pitch too also becomes okay one more time h3 h3 let's have to change our distance to 33. okay one more so let's give a buttons command okay these have a command so this should take us to page three and this should take us back to page one so i said this is nest i'm trying to make it look a little bit fun i know it's not that much fun though oh okay so let's let's take a little bit down okay okay here we go so there we go page two we have our nest so we are in page three now we are back to page one so it's more like i want to log into my home page just don't do anything but like i said just log into your page maybe you move into your dashboard so let me show you one more thing so let's say you want to create 10 pages no matter the amount of pages you want to create all you have to do you just have to come here you want to create 10 pages you need page four just get your page for page five you just specify any amount of page you want anytime you create a new pages i have to add it here this place basically shows shoe frame just to show the page you want to show first that's what it is all about yes your page one your page to your page three so this should take you to any page you want so that's all i got for you today thanks for watching guys if you like the video don't forget to subscribe to my channel thank you guys for watching this view see you in the next video
Info
Channel: Sen Gideons
Views: 17,726
Rating: undefined out of 5
Keywords: Python, Python Tkinter, Multiple Windows, Frames, Python Frames, Python Tkinter Frames, Tkinter, Python Gui Tutorial, Tkinter Frames Window, Python Multiple Windows, Python Tkinter Window, Python Tkinter multiple windows, Sen Gideons
Id: JOBiglq4VpQ
Channel Id: undefined
Length: 20min 55sec (1255 seconds)
Published: Sun Feb 20 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.