Hello and welcome to the part two of creatine a count down timer with Python Before I carry on.
I just want to elaborate on some key differences between the tea kin to this one and the tea kin to
import for the T T.
K..
All right.
The difference is a lot with the widgets with the widgets in t counter.
They are highly and easily configurable so you have almost complete control over how they look their
border with the font the images the color and so on.
The widgets that are controlled by t t k they use styles to define how they look.
So he takes a bit more work.
If you want a non-standard button then t t k widgets are also a little bit more.
They are more difficult to configure so they are both run under different types of engines so generally
speaking the theme widgets that Q that makes your application look more elaborate more elegant.
You get that white t t key but the TDK are less configurable in comparison to t Kinser.
All let's carry on.
So we are going to create say route
say route
is equals to T.
Okay.
The T K method of function.
What that does it creates a route.
So everything that you put on the screen whether it is a text box a bottom or an image is referred to
as a widget and they must all be placed in the root so you can think of a widget like a oh the.
Think of the route as a basket that you put all your widgets in.
So now that we've got the route sorted let's try and add some properties so we aren't going to say route
dot attributes.
Let us set the attributes
and this is relating to the screen so when you said how we want the screen to be.
So you do double quote dash pull screen
if you want your application to be full screen then the value you have to set the value to true.
I want to be able to control how the screen looks so I can resize it so I am set in that value to force.
So I want to set up the background color for the main screen.
See do route which is the main window.
So the route dot com configure
and inside parentheses you type in the word background.
Back
ground when to set a color to black
close it parent.
Is the next thing I wanted to.
I want a button like this X button to be on the application and I'm going to bind it to this function
here called quit.
So when you click on that X it will quit the application.
So I do route doesn't bind and inside the parentheses for that method I am going to do a double quote
and then the X..
So this will be the X on the screen that you can click on and the other argument I'm going to passing
is the function code quit.
Okay.
I'm passing that into that as well.
Next someone to do is call the function this one to trigger the clock.
So we do route 2 and to call the timer again so we want the timer to start again here after 1000 milliseconds.
We're passing the.
Can't wait.
Function
okay.
So we we specify the here.
We're doing that again here.
So this is called here wants the screen is activated.
So that's it for this video.
I will conclude in Part 3 in part 3.
We are going to partially set the end date and the time for the countdown.
We're going to set when we want the countdown to begin.
We'll do that in part 3.
Thanks for watching.