background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "1.Build a Retail Billing System using Python Tkinter GUI - Step-by-Step Tutorial"

input logo icon
Video tags
|

Video tags

python project
tkinter gui project
billing system
retail billing system
billing system project
billing system in python
bill management system
tkinter project
python tkinter project
tkinter billing system
tkinter billing software
billing system using tkinter
billing system using python
python gui project
restaurant billing system in python
python tkinter gui
python tkinter billing system
python gui
pythontkinter
pythongui
pythonprojectforbeginners
tkintertutorial
billingsystem
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:02
my name is faizan Khan and in this video
00:00:05
we are going to see how we can build
00:00:08
this retail Billing System step by step
00:00:11
from scratch
00:00:13
so let me firstly give you a quick
00:00:16
demonstration of how this project works
00:00:20
firstly we need to enter customer
00:00:22
details
00:00:24
so if you are not going to enter these
00:00:26
details then you won't be able to
00:00:28
generate the pill
00:00:30
thank you
00:00:31
it says customer details required
00:00:34
so I'll enter my name
00:00:38
and then some random phone number
00:00:43
after that we need to
00:00:46
enter the quantity of the products that
00:00:49
you want to purchase for example face
00:00:52
cream I want to hair gel I want one
00:00:56
then from grocery I'll select Dal as two
00:01:00
quantity then sugar as
00:01:03
three quantity
00:01:06
from cold Rings I'll select Pepsi as one
00:01:12
Coca-Cola S2
00:01:16
after this we have to click on this
00:01:20
total which simply provides you the
00:01:24
total cosmetic price total grocery price
00:01:27
and total cold ring price and here some
00:01:31
tax is added
00:01:34
after this we can click on this bill
00:01:37
so this will generate the bill inside
00:01:40
this bill area
00:01:41
and it will ask whether you want to save
00:01:45
this bill or not so I'm gonna save it so
00:01:49
once I click on see this bill with this
00:01:53
bill number which is random is saved
00:01:55
successfully
00:01:58
after that you can send this bill to any
00:02:02
email address
00:02:03
for that you have to click on this email
00:02:08
here you have to provide the sender's
00:02:11
email means your email and your password
00:02:15
and then to whom you want to send this
00:02:18
bill
00:02:20
okay that person email address you have
00:02:23
to mention here
00:02:25
after you enter you can click on the
00:02:28
send button
00:02:34
it says bill is successfully sent
00:02:36
we can check it
00:02:39
so I'll open my Google Chrome
00:02:42
and will open Gmail
00:02:49
as you can see that we have received the
00:02:52
bill with Bill number 39360
00:02:56
okay
00:03:00
after that we have this print button
00:03:03
on clicking this print button if your
00:03:06
printer is connected with your PC then
00:03:09
this bill will be printed out
00:03:14
here you just need to enter the file
00:03:18
name in which this bill will be saved it
00:03:21
will be a PDF file so you can simply
00:03:24
enter any name
00:03:27
once you will click save if your printer
00:03:29
is connected this bill will be printed
00:03:34
and at last we have the square button
00:03:37
once you'll click on it everything will
00:03:41
be cleared so do you really want to
00:03:43
clear yes
00:03:45
so you can see everything is cleared
00:03:49
after that we have this search option
00:03:52
here so whatever bills you have saved
00:03:55
you can search them and open them inside
00:03:58
this bill area
00:03:59
for example let me show you which Bill
00:04:02
numbers are saved already
00:04:05
so we have two bills here
00:04:07
I will be opening this one two seven six
00:04:11
five
00:04:14
so here I'll search for two seven six
00:04:17
five
00:04:19
once you search it you can see that will
00:04:21
as open inside this bill area
00:04:25
okay
00:04:27
and at last what we will see we will see
00:04:30
how we can create exe file of our
00:04:34
project
00:04:35
okay and we'll see how we can install it
00:04:38
in our PC
00:04:46
so you need two things to start with
00:04:49
this project firstly is the python
00:04:51
interpreter
00:04:52
and then any IDE where you will write
00:04:55
your code okay I'm gonna use pie charm I
00:04:59
will be providing you the link in the
00:05:02
description of this video
00:05:03
from there you can watch and download
00:05:06
and install
00:05:10
so if you are using pycharm what you
00:05:13
have to do go to file select new project
00:05:17
give a project folder name here it can
00:05:20
be
00:05:21
billing
00:05:23
project
00:05:25
from here you need to select the python
00:05:28
interpreter uh the latest one you can go
00:05:32
with I have three interpreters installed
00:05:35
so I'll select the latest one which is
00:05:37
3.10 okay 3.10
00:05:42
after that you just have to click on
00:05:44
this create button I want this project
00:05:46
to open on a new window so I'll select
00:05:48
new window
00:05:50
so once the project setup is done you
00:05:53
will see something like this
00:05:55
now you have to create a python file in
00:05:58
which you will write the code
00:06:01
so just right click on this project
00:06:03
folder name
00:06:05
go to new and select python file
00:06:08
here you have to provide any python file
00:06:11
name I'll go with name
00:06:14
so this is your python file inside which
00:06:16
you will write your python code
00:06:20
so if you see this original project
00:06:23
firstly we will be designing this GUI
00:06:27
okay
00:06:28
so for that we have one module in Python
00:06:32
which is TK enter
00:06:35
that will help us to create graphical
00:06:38
user interface very easily
00:06:41
we just need to import it and use its
00:06:45
classes and methods
00:06:47
so let's import that in our code
00:06:51
so we'll write from TK enter
00:06:53
import
00:06:55
asterisk
00:06:56
so this line means that we are importing
00:06:59
all the classes and methods that are
00:07:02
present inside this decanter module okay
00:07:06
assume decanter as a file inside which
00:07:10
we have some classes and methods that
00:07:14
will help in creating graphical user
00:07:17
interface very easily
00:07:21
so firstly what we have to do we have to
00:07:24
create a window right so for creating
00:07:27
window we have a class inside this
00:07:30
decanter module we just need to create
00:07:33
object of that class so how do we do
00:07:35
that we write object name as root
00:07:39
and we assign this class to this object
00:07:42
root
00:07:43
okay so this is the way
00:07:45
so this TK class will help in creating
00:07:49
our window okay we are simply creating
00:07:53
object of this TK class
00:07:56
once you create the object of TK class
00:07:58
and if you run at this stage
00:08:02
you can see there are no errors and code
00:08:07
is successfully ended okay but we were
00:08:10
not able to see the GUI window this is
00:08:14
because this code executed very fast so
00:08:18
our eyes were not able to see that
00:08:20
window
00:08:21
so in order to see that window
00:08:23
continuously we have one method inside
00:08:26
this TK which holds the window on the
00:08:29
screen Okay so
00:08:33
in order to use that method
00:08:36
will take help of this object variable
00:08:38
so we'll write object variable Dot
00:08:42
mean Loop method so this mean Loop
00:08:45
method will help in viewing our window
00:08:49
okay now if you rerun it
00:08:53
you can see the window is created and by
00:08:57
default this is the size of our window
00:08:59
where the title is TK okay
00:09:04
but we want a bigger size right so we
00:09:08
will set the size of this window and
00:09:11
we'll also change the title
00:09:16
so in order to change the title of our
00:09:19
window
00:09:20
we have a method
00:09:22
title inside this TK class so again
00:09:25
we'll access that method with the help
00:09:27
of this object root okay so we'll use
00:09:31
title method and to this title method we
00:09:34
have to pass the string so it will be
00:09:37
retail
00:09:39
billing
00:09:41
system
00:09:43
like this
00:09:44
okay so now if you run it
00:09:47
you can see the title is changed you are
00:09:50
not able to see the title because the
00:09:52
window size is small but if you drag it
00:09:54
you will be able to see it
00:09:57
and now let's change the size of our
00:09:59
window
00:10:01
for changing the size we again have one
00:10:04
method which is known as geometry so
00:10:06
we'll use that so we'll write root dot
00:10:08
geometry
00:10:09
and here we need to pass the width
00:10:13
small X then the height okay so with
00:10:18
that I am going to use is one two seven
00:10:22
zero
00:10:23
and the height that I'll be using is
00:10:26
685
00:10:29
this is the same width and the height
00:10:31
that I have used in my original project
00:10:34
so now if I run it
00:10:37
you can see the window size is increased
00:10:39
right
00:10:42
so by default the icon is this leave
00:10:45
okay but we can change it
00:10:49
let's see how we can change the icon
00:10:52
so firstly we will be requiring the icon
00:10:55
image
00:10:56
so from where you can get that just open
00:10:59
your Google
00:11:01
and there you need to search for Icon
00:11:04
Dash icons.com
00:11:08
here just simply enter billing
00:11:12
so you will be getting these icons here
00:11:16
whichever you like
00:11:18
you can simply open it okay and you have
00:11:22
to download the Ico formatted image okay
00:11:25
so select Ico and download the smallest
00:11:31
image 32px
00:11:37
once the icon is downloaded you can
00:11:39
simply copy the icon
00:11:42
and paste it
00:11:46
inside the same
00:11:48
folder where your python file is
00:11:52
okay you can change the name to Icon dot
00:11:56
ICU or any name of your choice
00:11:59
like this okay so this is the icon that
00:12:03
we will be adding
00:12:06
now to add the icon we have one method
00:12:09
which is known as icon bitmap okay so
00:12:13
that method we can access only with the
00:12:15
help of the object variable so root dot
00:12:18
icon bitmap and here we'll pass the
00:12:22
icon name which is icon dot ICU
00:12:27
like this now if you run it
00:12:30
you can see the icon is changed
00:12:33
all right
00:12:35
and now what we need to create let's
00:12:37
check the original project
00:12:40
so we need to add this title firstly
00:12:43
right
00:12:45
so in TK enter the text is always added
00:12:50
on our label
00:12:51
okay and the label is known as a widget
00:12:56
so what is a widget
00:12:58
anything that you are seeing on this
00:13:01
screen is a widget like for example this
00:13:05
button is a widget
00:13:07
okay this text area is a widget where
00:13:10
you will be seeing the bill right
00:13:13
this entry field is a widget where you
00:13:17
will see the text amount tax amount
00:13:20
right
00:13:22
similarly this is a frame okay this is
00:13:25
again a widget
00:13:26
inside which we have added these
00:13:29
products
00:13:30
all these buttons are a widget only
00:13:33
so labels buttons frames entry Fields
00:13:38
text area all are widgets only okay so
00:13:42
firstly let's create this heading
00:13:50
so as I told you
00:13:52
that we cannot directly add the text
00:13:55
for adding the text we have to firstly
00:13:58
create a label and then on that label we
00:14:00
will be adding the text
00:14:03
so I'll write heading label this is the
00:14:05
name that I am giving to a label and
00:14:08
label is created with the help of a
00:14:10
label class that is present inside the
00:14:13
stick enter module okay so we are simply
00:14:16
using the class and this will help us in
00:14:20
easily creating the label okay
00:14:23
so first thing that we need to pass to
00:14:27
this label is where you want to see this
00:14:29
label we want to see this label on our
00:14:32
window right and the window name is root
00:14:35
so we'll pass root here
00:14:39
after that what should be the text on
00:14:42
this label so the text will be
00:14:45
retail
00:14:49
billing
00:14:51
system
00:14:53
now after adding the text if you run at
00:14:57
this stage you won't be able to see this
00:14:59
label
00:15:00
the reason is you have just created a
00:15:03
label but you have not placed it
00:15:06
position it on your window right where
00:15:09
you want to see this label at the top at
00:15:12
the bottom on the left hand side or on
00:15:15
the right hand side
00:15:16
so for that we have a method inside this
00:15:19
label class
00:15:21
okay uh we will use that method and
00:15:24
we'll place our label on our window so
00:15:28
we'll be using this object variable
00:15:31
heading label
00:15:32
to access the method of this class
00:15:35
and the method name that I'm going to
00:15:37
use is path
00:15:39
okay
00:15:41
so this will simply add this label at
00:15:45
the top now if I run it
00:15:48
you will see the label here right retail
00:15:52
Billing System
00:15:53
so right now this is the font
00:15:57
size okay and The Styling by default but
00:16:01
we will change it okay
00:16:04
we'll uh try to make it look uh in the
00:16:08
same way as it is in our original
00:16:11
project
00:16:13
so let's add the font for this text
00:16:17
so for adding the font we have to pass
00:16:19
font
00:16:21
argument here
00:16:22
and the value will be inside these
00:16:26
parentheses which is nothing but the
00:16:28
Tuple okay first thing that we need to
00:16:32
pass is the font style so I'm going to
00:16:35
use Times New Roman
00:16:39
after that we need to pass the size of
00:16:42
the text so the size that I have used in
00:16:45
my original is 30 PX so I'm gonna pass
00:16:49
30 here
00:16:50
after that you can mention whether you
00:16:53
want the text to be bold italic or
00:16:56
underlined so I want the text to be bold
00:16:59
so I'll pass bolder okay that's it now
00:17:02
if you run it
00:17:04
you can see the font is changed
00:17:10
after that you can change the background
00:17:12
color of this label on which this text
00:17:15
is added right so we will be adding BG
00:17:20
BG stands for background
00:17:23
uh let me just move it to a new line so
00:17:26
that it's visible to you
00:17:28
so here we'll mention BG equals to the
00:17:33
color name so the color that I'm going
00:17:35
to use is gray 20.
00:17:39
we can use a lot of different colors so
00:17:43
let me show you uh what colors you can
00:17:46
use so simply go to Google
00:17:49
and search for tick enter colors
00:17:55
open any of these images you can save
00:17:59
these images and from here you can see
00:18:02
different colors names that you can use
00:18:05
in TK enter so I am going to use
00:18:09
gray 20 right
00:18:12
it's on this side
00:18:14
yeah this is the gray 20 color that I'm
00:18:17
going to use okay
00:18:19
so it's up to you which color you use
00:18:23
now if I run it
00:18:25
so this is how it looks okay
00:18:30
uh now we have to change this text color
00:18:33
so in order to change the text color we
00:18:36
have another argument which is FG which
00:18:38
stands for foreground
00:18:40
either you can write complete foreground
00:18:43
spelling or just FG similarly either you
00:18:46
can write background or just BG both
00:18:49
Works same way
00:18:52
and here we will mention the color name
00:18:54
so I'm going to use gold
00:18:57
okay so this is how it looks
00:19:01
after that I want to fill this
00:19:04
label completely onto this x-axis okay
00:19:08
so for that to this pack method we have
00:19:13
an argument which is fill and here we'll
00:19:15
mention that in which direction you want
00:19:17
to fill this label so we want to fill
00:19:20
this in the X Direction like this
00:19:25
after that let's add the border to this
00:19:28
label
00:19:30
so to this label we will add border
00:19:35
BD equals to 12. okay
00:19:41
I don't think you see any difference uh
00:19:44
let's add The Styling to this border uh
00:19:47
by using this relief argument and the
00:19:50
value will be group
00:19:59
yeah so this is how it looks now instead
00:20:02
of GrooVe there are some more values
00:20:04
that you can use for example there is
00:20:07
this flat okay then there is uh this
00:20:11
Ridge
00:20:12
okay so it's up to you which one you
00:20:16
want to use you can simply Google
00:20:19
these values
00:20:21
so we'll get a list of values which you
00:20:23
can use okay so I'll go with Groove
00:20:29
so after creating uh this heading now we
00:20:33
need to create this customer details
00:20:36
section okay so this is nothing but a
00:20:40
label frame with a label customer
00:20:42
details okay so firstly we will be
00:20:44
creating a label frame okay and inside
00:20:48
that we will be adding label name and
00:20:51
its corresponding entry field okay this
00:20:54
is known as entry field
00:20:57
and then phone number it's entry field
00:21:00
then Bill number it's entry field and
00:21:02
then the search button
00:21:06
so firstly we will be creating a frame
00:21:10
customer
00:21:12
details
00:21:16
frame
00:21:19
and this is a label frame so it will be
00:21:22
created with the help of a label frame
00:21:24
class okay which is present inside this
00:21:28
peak enter
00:21:29
again the same thing that where you want
00:21:31
to see this label frame I want to see
00:21:33
this label frame inside my window so
00:21:36
we'll pass root here
00:21:38
after that what text you want to see
00:21:43
so we want to see
00:21:45
customer
00:21:46
details as the text right
00:21:52
again if you run at this stage you won't
00:21:55
be able to see this label frame the
00:21:58
reason is you just have have created
00:22:01
this label frame but you have not
00:22:02
positioned it on your screen you have
00:22:05
not placed it where you want to see this
00:22:07
frame right
00:22:10
so we will use this object variable dot
00:22:14
pack method okay uh let's run and see
00:22:19
you are not able to see it because the
00:22:22
specialty of the label frame is that
00:22:26
once you start adding things inside it
00:22:29
then only it is visible
00:22:32
for example once you will add a label
00:22:35
inside it name label okay you will be
00:22:39
able to see that frame
00:22:41
okay
00:22:44
so firstly let's add this name label
00:22:48
inside this Frame okay
00:22:54
so I'll create a name label
00:22:57
and as you know the label is created
00:23:00
with the help of a label class
00:23:01
this label will be inside this customer
00:23:05
details frame right so this time we will
00:23:10
pass this customer details frame
00:23:12
okay
00:23:15
after that what will be the text
00:23:18
so the text will be name
00:23:22
and then other things like font
00:23:25
and all we will be adding later okay for
00:23:28
now uh let me just
00:23:30
uh position it on inside this Frame okay
00:23:35
so right now if I'll run you won't be
00:23:37
able to see anything right
00:23:39
so we need to position it so we'll write
00:23:42
name label dot so we have used this path
00:23:46
method to position something on our
00:23:48
window right we also have one more
00:23:51
method which is known as grid
00:23:53
okay this helps in adding things on a
00:23:57
window in the form of rows and columns
00:24:00
okay so uh we have to just mention the
00:24:04
row number and the column number okay to
00:24:08
add this on our frame okay
00:24:14
so to this grid method we will mention
00:24:16
row 0 and column 0 y rho 0 and column 0
00:24:20
because uh this label is the first thing
00:24:24
getting added inside this Frame okay so
00:24:27
it has to be in at the starting position
00:24:30
only right so if I run now
00:24:33
you can see we are able to see this
00:24:36
Frame first of all and then this label
00:24:38
okay
00:24:40
I hope you are able to understand it now
00:24:43
we need to just provide some font to
00:24:45
this label Okay add some border to it
00:24:49
similarly font to this name label
00:24:52
okay so let's add
00:24:56
so font that I'm going to add for this
00:24:59
customer details text is
00:25:03
Times New Roman okay so the styling will
00:25:06
be Times New Roman
00:25:09
size of the text will be 15 and I'll
00:25:12
make the text as bold
00:25:18
so if you see this is how it looks okay
00:25:20
I'll change the color
00:25:24
so I'll move to a new line
00:25:30
here I'll mention the text color
00:25:32
to be gold
00:25:35
okay I think I have added extra comma
00:25:39
now if I run it
00:25:42
yeah this is how it looks
00:25:44
now let's add border to this Frame
00:25:49
so here I'll mention border equals to 8
00:25:53
and then the styling to this border will
00:25:56
be same as before Groove okay
00:26:04
and now let's provide font to this label
00:26:07
name
00:26:09
so here we have this label name
00:26:12
so I'll add font and it will be the same
00:26:16
font okay so we can simply copy this
00:26:19
font from here
00:26:21
so styling will be Times New Roman size
00:26:24
will be 15 and it will be bold
00:26:28
and I forgot to add the background color
00:26:32
to this label frame so let me add that
00:26:37
to this
00:26:38
customer details label frame here I'll
00:26:41
mention the background color as Gray 20.
00:26:49
yeah this is fine now
00:26:51
after this to this label also I'll
00:26:54
change the background color to gray 20
00:26:56
so that it can match with this Frame
00:26:59
color right
00:27:02
so here I'll mention BG equals to Gray
00:27:06
20.
00:27:07
okay
00:27:10
like this then I'll change the text
00:27:13
color to a white
00:27:17
or any color of your choice
00:27:19
so I'll move it to a new line
00:27:23
and here I'll mention FG which stands
00:27:25
for foreground which is nothing but the
00:27:27
text color and the color will be white
00:27:34
like this
00:27:37
and now after adding the label name
00:27:41
after that we have to add its entry
00:27:45
field okay inside which you will enter
00:27:47
the name right
00:27:50
this entry field so let's create it
00:27:58
so just like we are creating the label
00:28:00
in the same way we have to create the
00:28:02
entry field
00:28:03
okay using the entry class
00:28:07
so here we'll mention that it's a name
00:28:10
entry
00:28:13
okay and entry field is created with the
00:28:15
help of entry class
00:28:17
again where you want to see the Sentry
00:28:19
field we want to see this entry field
00:28:21
inside this customer details frame right
00:28:24
so we'll mention customer details frame
00:28:29
before adding uh further things let me
00:28:32
just position it
00:28:34
so we'll write name entry dot grid
00:28:38
this time what do you think what will be
00:28:40
the row and column value
00:28:42
if you see this original project
00:28:45
this is at row 0 column 0 so this is at
00:28:49
row 0 and column 1 right similarly this
00:28:54
will be at row 0 column 2 okay it is in
00:28:58
the form of a grid in the form of rows
00:29:01
and columns
00:29:03
so here we'll mention row 0 and column
00:29:07
1.
00:29:11
so as you can see
00:29:13
the entry field is created
00:29:16
okay so by default this is the font that
00:29:19
we are entering here this is the font
00:29:21
size okay we can change it
00:29:24
so here I will mention font
00:29:28
a style that will be using is Ariel
00:29:32
and the size of the text will be 15.
00:29:36
okay
00:29:40
yeah this is fine
00:29:44
after that I will provide border to this
00:29:47
entry field
00:29:48
so here I'll mention
00:29:51
border equals to 7 see these values you
00:29:54
can change it according to your own
00:29:58
requirement okay
00:30:01
like this
00:30:03
and then we will reduce some width of
00:30:06
this entry field
00:30:08
so here I'll write
00:30:11
width equals to 18
00:30:16
like this a little uh reduce
00:30:20
right
00:30:22
and after that we will be providing some
00:30:25
spacing between this name label and this
00:30:28
entry field
00:30:29
okay
00:30:31
so in order to provide horizontal
00:30:33
spacing
00:30:35
uh
00:30:36
inside this grid method of this name
00:30:39
label I will mention pad x equals to 20.
00:30:44
so this will add 20 pixels spacing on
00:30:48
the left hand side and on the right hand
00:30:50
side of this name label
00:30:53
so you can see 20 pixels here and 20
00:30:56
pixels here is added
00:30:59
okay
00:31:02
in the same way you can provide some uh
00:31:05
padding horizontal padding to this entry
00:31:08
field
00:31:11
so here you can mention pad x equals to
00:31:16
8
00:31:19
so 8 pixels here and 8 pixels here is
00:31:22
added okay
00:31:25
and similarly you can provide some uh
00:31:28
vertical padding okay vertical spacing
00:31:32
so to this name label only I will add
00:31:36
pad y equals to 2 pixels
00:31:40
okay so 2 pixels spacing is added from
00:31:44
top and bottom
00:31:47
foreign
00:31:50
labels just next to this entry field
00:31:52
right and its corresponding entry field
00:31:57
just like you can see here
00:32:00
okay so it will be created in the
00:32:03
similar way just like we created this
00:32:05
name and its entry field
00:32:08
right so firstly we will be creating
00:32:10
phone label so that will be created in
00:32:13
the same way so I can simply copy this
00:32:16
paste here and then change the name
00:32:20
so we can place multiple cursors
00:32:24
in pycharm with the help of ALT key and
00:32:27
mouse left button
00:32:29
so we can do
00:32:32
changes at the same time at different
00:32:35
places
00:32:36
okay so this will change to phone label
00:32:40
then the text instead of name will be
00:32:43
changed to phone
00:32:45
okay everything else like font
00:32:48
background foreground will remain same
00:32:52
then we need to change uh where you want
00:32:55
to see this phone label this time the
00:32:59
column value will be changed to 2.
00:33:01
because at column one we have this entry
00:33:04
field right
00:33:05
so now if I run it you can see we got
00:33:08
this phone label
00:33:10
just next to this phone label we have to
00:33:12
create entry field so it will be the
00:33:14
same entry field only so we can copy
00:33:18
this entry field from here
00:33:22
okay and we will paste here
00:33:25
and then we'll change the name
00:33:28
to phone entry
00:33:32
okay column value will be changed to 3.
00:33:39
like this
00:33:42
and now after this we have to create uh
00:33:46
this bill number label and its entry
00:33:50
field and then this search button so
00:33:53
let's quickly create these three
00:33:56
so we can again use the same label and
00:34:00
same entry field and we'll do the
00:34:02
changes in that so I'll simply paste it
00:34:05
so this will become
00:34:09
bill number label
00:34:13
and here the text will be changed to
00:34:15
bill number
00:34:18
okay column will be changed to 3 row
00:34:22
will remain same because it has to be in
00:34:24
the same row right and then I'll copy
00:34:27
this entry field
00:34:33
so this will now be
00:34:36
bill number entry fee
00:34:41
right
00:34:42
column will be changed to 4.
00:34:46
so if I run it
00:34:49
so this is how
00:34:51
it is looking so actually I think I uh
00:34:55
have given wrong column number to this
00:34:59
label bill number
00:35:01
let's see
00:35:02
uh bill number has to be at column four
00:35:05
right because this is already at column
00:35:08
three right
00:35:10
so this will be at column four then this
00:35:12
will be at column five
00:35:15
yeah now it's better
00:35:17
and at last we have to add the search
00:35:21
button
00:35:23
so button is created with the help of a
00:35:27
button class just like we are creating a
00:35:30
label with the help of a label plus
00:35:31
entry with the help of entry class so
00:35:34
the button will be created with the help
00:35:36
of a button class
00:35:38
so where you want to see this button we
00:35:40
want to see this button inside this
00:35:42
customer details frame so we'll pass
00:35:44
customer details frame here okay then
00:35:47
what should be the text on that button
00:35:49
uh we have to mention here
00:35:52
search okay
00:35:55
and then we will be providing font for
00:35:58
this text okay that will do it later but
00:36:02
firstly let's just position it so we'll
00:36:05
write search button dot create method
00:36:09
row will be
00:36:11
0 only column will be changed to 6 and
00:36:15
I'll add pad X
00:36:17
of 10 PX
00:36:21
like this
00:36:23
now let's change the font of this text
00:36:27
okay so here I'll mention font The
00:36:31
Styling will be Ariel size of the text
00:36:34
will be 12 and I'll make the text as
00:36:36
bold okay
00:36:40
like this
00:36:42
then we can add border
00:36:46
border of seven
00:36:51
like this
00:36:52
okay let me just provide uh some more uh
00:36:57
horizontal padding so I'll change it to
00:37:00
20px
00:37:02
and to this search button I will also
00:37:04
mention pad y of 8 pixels
00:37:08
okay
00:37:09
so this has increased the horizontal uh
00:37:14
sorry vertical spacing of all the
00:37:17
widgets right so we can remove uh the
00:37:21
vertical spacing that we gave to this
00:37:24
name label right two pixels so we can
00:37:27
remove it it's of no use now
00:37:29
because by giving vertical padding to
00:37:33
this search button it has applied to all
00:37:36
the other
00:37:38
widgets right
00:37:40
I hope this is clear
00:37:42
and this and this spacing is left right
00:37:45
so to the pack method of this customer
00:37:49
details label frame we will mention fill
00:37:53
X okay just like we did for the above
00:37:56
label
00:37:58
so customer details label frame to this
00:38:01
pack method will mention filex
00:38:05
so this will fill the complete x-axis
00:38:23
sorry I have mistakenly cut from here
00:38:27
I don't have to cut it
00:38:30
yeah
00:38:31
this is fine and you see uh
00:38:35
there is no gapping between this label
00:38:38
and this Frame right so we can provide
00:38:41
pad y uh to this label oh sorry to this
00:38:46
either to this label or to this Frame
00:38:49
it's up to you okay so we can provide
00:38:52
add y
00:38:56
equals to
00:38:58
10.
00:39:03
yeah this is better now uh after that I
00:39:06
want to provide some width to this
00:39:08
button
00:39:15
see the size is increased okay
00:39:19
uh one thing uh that I need to change
00:39:23
here is this name it has to be phone
00:39:26
number
00:39:27
okay not just phone
00:39:29
so here we have this text we'll change
00:39:32
it to phone number
00:39:37
yeah now it looks same as
00:39:41
it is in original project right
00:39:46
and now we have to create this
00:39:48
particular section so how do we start
00:39:51
firstly we will be creating one products
00:39:54
frame okay inside which we will be
00:39:57
adding uh this Cosmetics label frame and
00:40:01
its product then grocery label frame and
00:40:04
its product then cold Rings label frame
00:40:07
and its product and then this bill area
00:40:09
section okay inside that frame only
00:40:13
okay so frame is nothing but a container
00:40:16
which help us to simplify the sections
00:40:20
right so this was added in this customer
00:40:23
details frame right and now we are
00:40:26
creating another frame inside which
00:40:28
we'll be adding uh these sections okay
00:40:31
so I hoped uh I'm making sense you will
00:40:34
understand it once uh we'll do the code
00:40:37
okay
00:40:38
so firstly
00:40:43
I'll be creating a frame
00:40:46
okay
00:40:48
so this will be uh products frame or you
00:40:51
can name it anything and frame is
00:40:53
created with the help of a frame class
00:40:56
the difference between frame and a label
00:40:58
frame is that uh
00:41:01
frame does not have a label but label
00:41:04
frame has a label that's it okay
00:41:06
otherwise both are simply containers
00:41:08
inside which we simply add buttons and
00:41:12
labels and entry Fields okay
00:41:15
so this Frame again where you want to
00:41:19
add this Frame this time we will not be
00:41:22
adding this Frame inside this customer
00:41:23
details frame right we'll be adding this
00:41:26
Frame inside my window name right which
00:41:30
is root so we'll pass root here
00:41:35
okay and then we can simply
00:41:39
pack it
00:41:42
so when we use pack method uh it simply
00:41:46
packs everything one after the other
00:41:49
okay so firstly we packed this heading
00:41:53
label so it was at the top then we
00:41:56
packed this customer details frame which
00:41:59
was just next to this and now we are
00:42:02
packing this products frame right which
00:42:06
will be just next to that customer
00:42:08
details frame right and inside customer
00:42:11
details frame we added all these labels
00:42:15
and buttons right sorry one button only
00:42:18
right so I hope this is clear to you
00:42:22
and as you know if I'll run at this
00:42:25
stage you won't be able to see this
00:42:27
Frame because I told you uh frames are
00:42:31
visible only when you start adding
00:42:33
things inside it so first thing that we
00:42:36
need to add is this
00:42:39
Cosmetics label frame
00:42:42
okay firstly we'll create this Cosmetics
00:42:44
label frame and then inside it we'll be
00:42:48
adding these labels and the
00:42:49
corresponding entry fields
00:42:54
so we'll create cosmetics
00:42:57
frame okay and this will be a label
00:43:00
frame and this label frame will now be
00:43:03
inside this products frame
00:43:06
so we'll pass products frame here okay
00:43:08
the text
00:43:10
for this label frame will be cosmetics
00:43:15
then we have to provide font for this
00:43:18
text border for this label frame styling
00:43:21
to the Border background color and the
00:43:24
text color which we have already done it
00:43:27
before right when we were creating the
00:43:29
label frame so we can simply copy those
00:43:33
uh values okay so we'll copy the font
00:43:38
we'll copy the text color we'll copy the
00:43:40
Border The Styling and the background
00:43:43
color
00:43:46
so you can copy these things
00:43:48
and we can simply paste here
00:43:53
put comma here
00:43:55
okay
00:43:57
so after creating the label frame you
00:44:00
need to position it so I'll write
00:44:02
Cosmetics frame dot grid method
00:44:06
okay
00:44:09
so where you want to grade it and why I
00:44:12
am using grid method because as you can
00:44:15
see in the original project uh this
00:44:17
section is in the form of rows and
00:44:19
columns where this Cosmetics frame is at
00:44:23
row 0 column 0 this grocery frame will
00:44:27
be at row 0 column one this will be at
00:44:29
row 0 column two and then this will be
00:44:31
at row 0 column three
00:44:33
I hope you are getting it so that's why
00:44:36
I'm using
00:44:37
grid method it will be easy to position
00:44:40
okay so row will be 0 and column will be
00:44:45
zero
00:44:48
okay so again if I run it you won't be
00:44:51
able to see this because this is again a
00:44:54
frame only right firstly we created this
00:44:57
Frame and inside this Frame we have
00:44:59
created this label frame and now once we
00:45:02
start adding things inside this label
00:45:04
frame you will be able to see this label
00:45:06
frame right
00:45:08
so first thing that we need to add is
00:45:12
this bath soap label right
00:45:17
and as you know how labels are created
00:45:20
so but
00:45:22
so label
00:45:27
and we'll use a label class
00:45:29
this label will be inside my Cosmetics
00:45:33
frame right so I'll pass Cosmetics frame
00:45:36
here then the text will be
00:45:40
bar so
00:45:43
okay
00:45:44
after this we need to add font for this
00:45:47
text so font will be same as the
00:45:51
previous label that we created this
00:45:53
phone label so we can copy the font from
00:45:56
here
00:45:57
okay in fact we can copy the text color
00:46:00
as well
00:46:03
so we'll paste here
00:46:05
so we have copied font
00:46:08
the background color and the text color
00:46:12
so now if I run it
00:46:16
oh you can't see it the reason is
00:46:19
this we have not
00:46:23
positioned it right so we'll write path
00:46:25
soap label Dot
00:46:28
grid method
00:46:30
okay
00:46:32
and it will be graded at row 0 and
00:46:35
column 0.
00:46:38
I hope you are able to understand what
00:46:41
is happening here firstly we have
00:46:43
created a frame inside this Frame we are
00:46:48
adding Cosmetics frame okay and inside
00:46:51
this Cosmetics frame we are adding this
00:46:54
bar soap label
00:46:55
okay
00:46:58
and since inside this Cosmetics frame
00:47:01
nothing is there
00:47:03
so that is why
00:47:05
we are writing row 0 and column 0
00:47:07
because this bar soap label is the first
00:47:10
thing getting added inside that frame
00:47:13
so now you are able to see this path
00:47:16
soap label
00:47:17
and also this Cosmetics label frame
00:47:21
and this Cosmetics label frame is inside
00:47:24
of frame
00:47:25
okay
00:47:29
so after creating this bar soap label
00:47:32
next we need to create this entry field
00:47:35
okay
00:47:38
so we'll name it bath soap entry
00:47:43
okay and it will be created with the
00:47:45
help of entry class only
00:47:48
so we can firstly uh grade it so right
00:47:52
but so play entry dot grid method where
00:47:56
do you think it will be graded it will
00:47:58
be graded at row 0 and column one okay
00:48:02
just next to this batch Loop label we
00:48:04
want this entity right so that is why
00:48:06
column one so now if you run it
00:48:10
you are getting this error because you
00:48:12
have not mentioned that where you want
00:48:14
to see this entry field okay we want
00:48:16
this entry field inside this Cosmetics
00:48:18
frame only right so we'll mention
00:48:20
Cosmetics frame
00:48:24
yeah so this is how the entry field
00:48:26
looks like uh will increase the font
00:48:30
size
00:48:31
okay so we will be using the same font
00:48:42
okay then we'll reduce the width
00:48:46
so we'll make the width as 10.
00:48:52
yeah this is fine and then we'll add
00:48:56
border
00:48:59
of 5 pixels
00:49:03
and let me just firstly add some uh pad
00:49:07
y to this Frame right so that we can see
00:49:11
some uh vertical spacing between this
00:49:14
customer details section and this
00:49:16
product frame right
00:49:20
so uh to this product frame
00:49:24
here we'll mention pad y equals to 10
00:49:28
pixels
00:49:30
okay so now we have some spacing here
00:49:34
coming to this uh just like we have
00:49:37
created this bar soap and its center
00:49:40
field in the same way we will be
00:49:42
creating
00:49:43
the other products face cream face wash
00:49:45
hair spray hair gel body lotion okay and
00:49:48
we also need to provide vertical spacing
00:49:51
pad y Okay so
00:49:54
to this bath soap only
00:49:57
label I'll mention pad y equals to 9
00:50:02
pixels uh these values you can uh
00:50:06
play around right you can decrease or
00:50:09
increase according to your own choice
00:50:12
okay
00:50:13
so I have used 9 pixels in my original
00:50:15
project that is why I'm using the same
00:50:17
value here okay
00:50:20
uh you can mention pad y equals to 9
00:50:23
here as
00:50:26
so now let's create the other one
00:50:29
which is face cream
00:50:32
okay as it has to be created in the
00:50:35
similar way so I'll be simply copying uh
00:50:38
these lines okay so label and the entry
00:50:42
field I'll copy and then I'll do the
00:50:45
changes in the name
00:50:47
to instead of bad soap uh
00:50:50
this will be changed to face cream
00:50:57
okay face cream label and face cream
00:50:59
entry the text here will be changed to
00:51:03
face cream
00:51:07
uh then uh apart from this everything
00:51:11
else will remain as it is only the grid
00:51:13
value row and column value will change
00:51:15
row will become 1 this time because it
00:51:19
has to be just below this
00:51:21
label right so row value will become one
00:51:24
column will remain zero only
00:51:26
okay here uh this entry field will be at
00:51:29
Row 1 and column one okay
00:51:32
so if you return it
00:51:36
you can see this is how it looks
00:51:39
uh we also need to add some horizontal
00:51:42
uh padding okay Paradox uh so let's see
00:51:48
uh we'll firstly add paddocks uh 10 PX
00:51:54
okay so to this bar soap label to this
00:51:59
entry field
00:52:00
and to this face cream label and to the
00:52:03
centrifield I mentioned pad x equals to
00:52:06
10 PX
00:52:09
okay so when we added two bath soap it
00:52:13
has added 10 PX here 10 PX here
00:52:16
then when we add it to the entry field
00:52:19
it has added 10px air and 10px here okay
00:52:25
so this 10 PX of this bath soap and of
00:52:28
the century field has simply overlapped
00:52:30
okay
00:52:34
and after this face cream next we have
00:52:37
face wash okay
00:52:42
so again I will simply copy
00:52:47
the label and the entry field and will
00:52:49
paste here
00:52:50
so this will be changed to face wash
00:52:59
okay uh the text will be changed to face
00:53:02
wash
00:53:04
row value will change only
00:53:06
column will remain same as the above one
00:53:09
okay
00:53:12
like this
00:53:14
so now I guess you can quickly complete
00:53:18
it by yourself the products it's up to
00:53:21
you what product names you choose
00:53:26
and one more thing
00:53:28
the text here
00:53:30
is centered right I want it to be left
00:53:36
aligned okay so that this B should start
00:53:40
from the same X distance as this F okay
00:53:44
so for that we have to use one uh
00:53:49
argument which is a sticky
00:53:52
Okay so uh to these labels we can add
00:53:57
that sticky
00:54:00
so just Place multiple cursors to these
00:54:03
labels
00:54:04
and mention sticky as w
00:54:08
okay so these labels will be sticked on
00:54:12
the western side
00:54:15
like this
00:54:16
I hope this is clear to you
00:54:19
so let me quickly add other products and
00:54:23
their corresponding entry field
00:54:49
FIFA
00:55:08
foreign
00:55:54
so after adding all the Cosmetic
00:55:56
products now if you run it you'll see
00:55:59
something like this
00:56:01
okay since in these three uh sticky is
00:56:06
not added so that's why you are seeing
00:56:09
them at the center you can add sticky
00:56:12
and value w
00:56:31
yeah now it's fine
00:56:35
so after this cosmetic section next we
00:56:39
have grocery section
00:56:41
just next to this okay
00:56:44
so we'll uh create grocery label frame
00:56:49
and that will be created in the same way
00:56:53
as this Cosmetics label frame right
00:56:57
this Cosmetics label frame was inside
00:57:00
this products frame so grocery frame
00:57:03
will also be inside this products frame
00:57:05
okay
00:57:07
so Cosmetics frame was at row 0 column 0
00:57:10
so grocery frame will be at row 0 and
00:57:15
column one
00:57:16
I hope you are getting it
00:57:19
so here we'll mention
00:57:21
uh
00:57:24
this is a
00:57:27
grocery
00:57:29
frame the text will be changed to
00:57:32
grocery
00:57:34
okay and it will be at column one row
00:57:38
will be 0.
00:57:39
I hope you are getting it
00:57:41
so again if I'll run at this stage you
00:57:44
won't be able to see this glossary frame
00:57:46
uh let's add
00:57:49
label and entry field inside this
00:57:52
glossary frame
00:57:55
so first product that we can see in my
00:58:00
original project is rice
00:58:02
so let's add rice and its entry field
00:58:05
so I hope now you understood how things
00:58:07
are getting added and it will be added
00:58:10
in the similar way only so you can copy
00:58:12
one entry field and one label from the
00:58:14
top and you can simply paste it here
00:58:18
what changes you need to do now firstly
00:58:22
change the frame name this time you want
00:58:25
these label and this entry field inside
00:58:28
grocery frame
00:58:29
right so we'll mention grocery frame
00:58:32
after that you need to change the text
00:58:35
to Rice
00:58:36
okay change the name to Rice label and
00:58:40
rice entry field
00:58:53
okay after that you have to change the
00:58:57
row and column value okay since uh it's
00:59:00
a new frame okay and nothing is added uh
00:59:03
inside this glossary frame yet so a rice
00:59:07
label is the first thing we are adding
00:59:09
so it will be at row 0 column 0 okay
00:59:12
rice entry has to be just next to this
00:59:15
price table so it will also be at row 0
00:59:17
but column value will be 1. okay
00:59:21
if you run it
00:59:23
you can see this rise
00:59:25
label and its entry field
00:59:29
I hope this is clear in the same way we
00:59:31
will do for rest of the products
00:59:39
next one is while
00:59:44
so we can copy
00:59:46
label and entry
00:59:50
so this one will now be coil
01:00:01
row value will be changed to 1.
01:00:04
here row value will be 1.
01:00:10
okay
01:00:12
in the same way we'll do it
01:00:16
for rest of the products I'll do it
01:00:18
quickly okay
01:01:11
foreign
01:01:57
section is also ready
01:01:59
okay
01:02:01
just next to this grocery section we
01:02:03
have to create cold ring section
01:02:08
so firstly we will be creating cold
01:02:10
Rings label frame
01:02:12
okay so I'm going to copy the grocery
01:02:15
frame
01:02:17
and we'll do the changes
01:02:27
so I'll name it drinks frame
01:02:30
here the text will be cold drinks
01:02:35
okay uh the column value will be changed
01:02:38
to 2.
01:02:40
okay because at column one we already
01:02:42
had gross reframe right
01:02:46
and now let's start adding things inside
01:02:48
this drinks frame
01:02:50
so again I'll be copying uh one of the
01:02:53
label and entry field from the top
01:02:56
and we'll paste here
01:02:59
we'll change the name
01:03:02
as it is in my original project so first
01:03:04
is Maza
01:03:10
you can add any name of your choice okay
01:03:14
any products
01:03:22
row value will be zero
01:03:26
here also row value will be zero
01:03:28
instead of gloss free frame
01:03:31
it will be drinks frame now
01:03:33
okay
01:03:36
yeah like this
01:03:38
uh its entry field is not visible why
01:03:44
because the frame name is not changed
01:03:46
here this is drinks frame
01:03:52
yeah now it's visible
01:03:55
after Maza
01:03:58
we have Pepsi then a Sprite
01:04:07
so I'll paste here
01:04:10
this name will be changed to Pepsi
01:04:16
here the text will be changed to
01:04:19
Pepsi
01:04:21
row value will be changed to 1. here
01:04:24
also one
01:04:27
after Pepsi then we have Sprite
01:04:45
True Value will be 2 here also value
01:04:48
will be 2.
01:04:50
after Sprite
01:04:53
then we have due fruity and Coca-Cola
01:05:04
this is two
01:05:07
uh let me just put it to lowercase
01:05:13
do
01:05:15
it will be 3 and 3.
01:05:21
after due or it was
01:05:24
fruity
01:05:42
and the last one was Coca-Cola
01:06:07
foreign
01:06:11
and now we have to create a bill area
01:06:14
Okay uh just like this one okay so
01:06:19
firstly we will be creating a frame
01:06:22
and that and then inside that frame we
01:06:25
will be adding this uh
01:06:27
heading Bill area Okay and then this is
01:06:31
nothing but a text area
01:06:33
and uh we'll also see how we can add
01:06:36
scroll bar to the text area so if the
01:06:39
text will move down so the scroll bar
01:06:42
will be activated and you will be able
01:06:45
to scroll up and down
01:06:47
okay
01:06:48
so we'll see this
01:06:51
so let's create a frame
01:06:55
uh Bill frame
01:06:58
okay and
01:07:01
this will be simply a frame okay not a
01:07:05
label frame as you can see the original
01:07:08
project
01:07:09
this has does not have any label right
01:07:13
so it's simply a frame
01:07:16
so this Frame will be inside my
01:07:21
product frame
01:07:24
okay
01:07:27
then I'll simply
01:07:31
grade it
01:07:34
so this will be graded at
01:07:37
row
01:07:39
or three I guess let's see where the
01:07:43
earlier frame was added
01:07:46
drinks frame was added at uh sorry row
01:07:49
will be 0 only column will be 3 okay
01:07:52
after this drinks frame only we want
01:07:55
that right so row will be 0 only
01:08:00
column will be 3.
01:08:02
so we'll create
01:08:04
Bill area label
01:08:07
using a label class this label will be
01:08:10
inside my build frame
01:08:12
the text will be
01:08:14
label area
01:08:19
font for this text will be this only
01:08:28
and now let's position this label
01:08:32
so I'll write Bell area label dot pack
01:08:36
method why I am using pack method uh as
01:08:39
you know this bill frame is a separate
01:08:42
frame right and inside this Frame we are
01:08:45
adding this bill area right which is the
01:08:47
first thing we are adding inside it
01:08:49
okay and it has to be at the top inside
01:08:52
this bill frame right so we are simply
01:08:54
using pack method we could also have
01:08:57
used grid method with row 0 and column 0
01:08:59
that would also uh be fine
01:09:05
so now if I run it
01:09:07
you can see this label area here
01:09:12
we will provide border uh to the frame
01:09:16
build frame and groove is styling to it
01:09:19
okay so this is the bill frame
01:09:23
so we'll pass BD as 8
01:09:26
and release as group
01:09:32
okay like this
01:09:34
then to this label area label
01:09:38
also we'll add border
01:09:42
BD equals to 7 and relief equals to
01:09:46
group
01:09:50
all right like this
01:09:52
and now just below this uh title we have
01:09:56
to add the text area okay inside which
01:09:59
you will display the bill
01:10:03
so for creating the text area
01:10:06
there is a class called text okay so
01:10:09
I'll write text area equals to text
01:10:13
and this takes class where you want to
01:10:17
add this text area we want to add this
01:10:19
text area inside this build frame so
01:10:22
mention Bill frame here
01:10:26
okay and then we can simply pack it so
01:10:29
we'll write text area dot pack
01:10:33
so if I run it
01:10:36
you can see this is the size it takes by
01:10:38
default okay this is the text area that
01:10:41
is added
01:10:43
let's fix it
01:10:47
so height that I am going to use is 18
01:10:51
and width that I'm going to use is 60.
01:10:57
so it will look something like this
01:11:00
okay
01:11:02
so these values uh you can simply uh
01:11:06
decrease or increase according to your
01:11:08
choice okay
01:11:09
so I have simply checked it played with
01:11:12
these values uh to get the perfect
01:11:15
values okay
01:11:17
apart from this uh this text is wrong it
01:11:22
should be
01:11:23
uh Bill area right and it should be
01:11:26
expanded
01:11:28
uh completely inside this Frame okay so
01:11:31
we'll use philx so here we'll mention
01:11:34
fill X and this will be Bill area
01:11:42
yeah now this is fine
01:11:45
and now let's add this crawl bar on the
01:11:49
right hand side okay inside this text
01:11:51
area
01:11:54
so in order to add this crawl bar
01:11:57
uh we'll be using the scroll bar class
01:12:00
okay to add the scroll bar
01:12:03
and we'll name it scroll bar
01:12:08
okay and this is scroll bar also has to
01:12:11
be inside this bill frame only
01:12:15
and after that we also have to mention
01:12:17
that whether you want horizontal scroll
01:12:20
bar or vertical scroll bar so Orient
01:12:23
will be vertical
01:12:26
and then after creating this scroll bar
01:12:28
we also need to pack it and we have to
01:12:31
pack it on the right hand side so we'll
01:12:33
use pack method and side will be right
01:12:38
okay
01:12:42
let's see
01:12:44
yeah so the scroll bar is added here
01:12:48
okay actually we need to decrease some
01:12:51
width of this
01:12:53
uh
01:12:55
text area
01:12:56
so we'll make it 55
01:13:03
so as you can see the scroll bar is
01:13:05
added inside this text area right
01:13:10
let me just provide some
01:13:13
pad X
01:13:16
often to this bill frame okay
01:13:20
so that you can see little spacing here
01:13:24
and then uh
01:13:25
fill this
01:13:27
scroll bar completely on the y-axis okay
01:13:31
so uh here I'll also mention
01:13:35
fill
01:13:37
equals to Y just like we used to fill in
01:13:40
the horizontal axis this time we'll fill
01:13:43
the scroll bar on the y-axis okay so
01:13:46
inside this Frame uh this is filled
01:13:49
right on the y-axis okay
01:13:52
right now uh if I'll write some text and
01:13:56
we'll move it down this scroll bar is
01:13:59
not activated right this fault bar is
01:14:02
not active so if you move it down you
01:14:06
won't be able to see the bottom text
01:14:08
okay so because this is not functioning
01:14:10
with this text area okay this is not
01:14:13
connected with this text area so how do
01:14:16
we connect it
01:14:19
firstly you will have to add
01:14:24
y scroll
01:14:26
command
01:14:28
equals to
01:14:30
scroll bar dot set
01:14:34
okay so this uh will simply set the
01:14:39
scroll bar with this text area
01:14:41
okay so now if I run it
01:14:45
so now this is scroll bar is set with
01:14:48
this text area okay
01:14:50
you can see this it is set with the text
01:14:53
area but you will not be able to see the
01:14:56
upper view when you will scroll up okay
01:15:01
so in order to move uh this text area up
01:15:06
and down uh using this scroll bar
01:15:11
we have to
01:15:13
configure this scroll bar so we'll write
01:15:16
scroll bar dot config and here we'll
01:15:19
pass the command equals to
01:15:23
text area dot y view okay so what we
01:15:28
want that whenever we scroll the scroll
01:15:31
bar we should see the why view of the
01:15:33
text area
01:15:34
so we are simply configuring the scroll
01:15:37
bar
01:15:40
so we have firstly created the scroll
01:15:42
bar okay then we have created the text
01:15:45
area then we have set the scroll bar
01:15:49
with this text area
01:15:51
and then in order to see the vertical
01:15:54
view of the text area you have to
01:15:56
configure the scroll bar
01:15:58
like this
01:16:00
I hope this is clear to you now if
01:16:03
you'll write some text and move it down
01:16:08
so now you will be able to see the upper
01:16:11
view of this text area by scrolling up
01:16:13
this is scroll bar
01:16:15
I hope this is clear to you okay
01:16:20
so this products frame section is also
01:16:23
completed
01:16:26
just below it
01:16:28
next we have to create this bill menu
01:16:32
okay
01:16:33
inside which we'll be adding these
01:16:36
labels these entry fields and then these
01:16:38
buttons
01:16:42
let's quickly finish it so firstly we'll
01:16:44
be creating a bill menu
01:16:47
okay
01:16:48
so just like we created uh the product
01:16:53
frame in the same way we'll be creating
01:16:56
the bill menu
01:16:58
but it will be a label frame this time
01:17:00
okay
01:17:02
so we have created this products frame
01:17:04
right
01:17:07
so uh what we are going to copy we are
01:17:10
going to copy this one
01:17:13
okay because uh this time I'll be
01:17:16
creating a label frame right that's why
01:17:18
I'm copying a label frame okay
01:17:25
I'll paste here
01:17:27
and this will be Bill menu frame
01:17:34
text here will be
01:17:37
bill
01:17:39
menu okay
01:17:41
this build menu frame will be inside my
01:17:45
root window
01:17:47
okay
01:17:50
if you see this
01:17:52
products frame
01:17:56
was inside my root window right and it
01:17:58
was packed
01:18:00
with a vertical spacing of 10 pixels
01:18:03
right
01:18:05
so this bill menu frame will also be
01:18:07
inside my root window
01:18:09
and it will be tagged
01:18:14
okay
01:18:17
so you won't be able to see it
01:18:19
let's add things inside it okay
01:18:24
so first label that we will be adding
01:18:27
inside this bill menu frame is cosmetic
01:18:29
price label okay
01:18:32
as you can see in this original project
01:18:35
okay cosmetic price
01:18:39
so I'll copy the already created label
01:18:44
like this
01:18:46
one
01:18:50
and I'll do the changes in it
01:18:54
so this one will be named as cosmetic
01:18:57
price
01:18:58
cosmetic price
01:19:03
and this label will be inside my bill
01:19:05
menu frame
01:19:10
the text will be cosmetic price
01:19:18
okay then the row value will be 0 as
01:19:24
this cosmetic price label is the first
01:19:27
thing getting added inside this bill
01:19:29
menu frame
01:19:32
so if I run it
01:19:36
and next to it we will be creating its
01:19:38
entry field
01:19:42
so I'll copy one entry field from above
01:19:51
and will paste here
01:19:54
so I'll change the name to
01:19:56
cosmetic prize entry
01:20:03
okay this will not be inside drinks
01:20:06
frame but inside Bill menu frame
01:20:13
okay
01:20:15
its row will be 0 and column will be 1.
01:20:19
and here you can add pad X of 10 pixels
01:20:25
and similarly you can add
01:20:28
this grocery price and cool ring price
01:20:31
and their entry fields
01:20:35
so we can copy these two things
01:20:39
and we can paste here
01:20:42
foreign
01:20:43
this will be
01:20:45
grocery price
01:20:54
okay row value will be changed to 1 and
01:20:58
here also it will be 1.
01:21:06
let's change the text to grocery price
01:21:19
and just below this we also had to add
01:21:23
cold ring price okay but the space is
01:21:27
not there so what we can do either we
01:21:30
can reduce the size of the labels okay
01:21:36
or we can simply remove the pad y values
01:21:41
right that we added okay so it will move
01:21:44
a little bit up this section will also
01:21:47
move a little bit up so we'll get some
01:21:49
more extra space right
01:21:52
so what we can do we can search in our
01:21:54
code so we'll press Ctrl R in pycharm
01:21:57
and we'll check pad y equals to 10 okay
01:22:01
so in heading label we added pad y
01:22:05
equals to 10. so we can simply remove it
01:22:10
and then add one more place we added
01:22:14
here in products frame rate so we can
01:22:17
remove it
01:22:21
let's run
01:22:24
yeah so you can see now we uh are having
01:22:27
some space for the third one
01:22:30
okay
01:22:31
so let's add the third one
01:22:49
so this will be drinks price and Rings
01:22:53
entry
01:22:56
ranks price label and Rings price entry
01:22:59
okay
01:23:01
cold ring price
01:23:08
okay and this will be row 2.
01:23:16
still we need some extra space
01:23:20
so what we can do we can simply decrease
01:23:23
some font size of
01:23:26
the label and the entry Fields okay so
01:23:30
here we have 15 let's make it 14 okay
01:23:38
so just Place multiple cursors
01:23:52
so we'll make it 14.
01:23:58
uh we need some more extra spacing let's
01:24:02
make it 13.
01:24:08
yeah now it's better
01:24:14
right and and if you want you can also
01:24:18
decrease vertical padding of uh vertical
01:24:22
padding nine right it is 9 here so yeah
01:24:25
I think this will will be better uh
01:24:28
instead of making it uh 13 we could make
01:24:32
it 14 and we could reduce some vertical
01:24:34
padding okay so you can press Ctrl Z
01:24:37
make it 14. and then you can simply
01:24:42
decrease pad y value
01:24:46
instead of 9 let's make it 6.
01:24:54
now I think this looks better and uh
01:24:58
just next to this we have three more
01:25:02
labels and their entry Fields cosmetic
01:25:04
tags grocery tags and cold attacks and
01:25:07
their entry Fields okay
01:25:10
so we can simply copy these
01:25:14
right
01:25:16
and we can paste them
01:25:20
and we can do the changes in it
01:25:24
okay so cosmetic price label will be
01:25:28
changed to
01:25:30
cosmetic tax
01:25:35
okay
01:25:37
here the text will be changed to tax
01:25:40
row value will be zero only a cosmetic
01:25:44
tax label okay row value will be zero
01:25:47
but the column value will become 2 here
01:25:51
okay because it has to be after this uh
01:25:55
Cosmetics entry uh field right which is
01:25:58
at column one
01:25:59
okay firstly we have this label then we
01:26:02
have this entry field after this again
01:26:04
we want uh cosmetic tax label right so
01:26:07
it has to be at column two
01:26:09
I hope you are getting it
01:26:25
and the text will be changed to grocery
01:26:28
tax
01:26:31
okay row value will be 1 only
01:26:34
uh the column value will be changed to 2
01:26:37
and I forgot to change the column value
01:26:39
here of this entry field this will be
01:26:41
three similarly this grocery tax entry
01:26:44
will also be at column three
01:26:50
then we'll change this label name and
01:26:53
this entry field name to drinks tax
01:26:57
and we'll change the text to cooling
01:26:59
tags
01:27:03
label column will be changed to 2 and
01:27:07
entry field column will be three
01:27:16
and lastly we have to create this button
01:27:18
frame and inside that we will be adding
01:27:21
these buttons so I'll create a button
01:27:24
frame
01:27:26
using the frame class
01:27:29
this button frame will be inside my
01:27:31
build menu frame
01:27:33
then I'll add border to it
01:27:36
and styling to this border
01:27:40
after that I'll simply grade it
01:27:44
Pro value will be zero
01:27:46
column will be 4
01:27:49
because it has to be just next to this
01:27:51
drink Stacks entry which is at column
01:27:54
three right so that's why I call up 4
01:27:56
here
01:27:57
now let's add button inside this Frame
01:28:01
so first button will be total button
01:28:05
so we'll create this button with the
01:28:07
help of a button class
01:28:09
this button has to be inside this button
01:28:12
frame then the text on this button will
01:28:15
be total
01:28:19
after that I'll provide font for this
01:28:22
text
01:28:23
the spelling will be Ariel
01:28:25
size will be 16. and the button text
01:28:30
will be bold
01:28:31
and then I will simply grade it so I'll
01:28:34
write total button dot grid
01:28:36
row will be zero and column will be 0.
01:28:41
okay
01:28:43
so this is how the pattern looks like
01:28:47
now let me add background color to this
01:28:50
button
01:28:51
which will be Gray 20.
01:28:54
then the text color will be white
01:29:01
after that I will add border to this
01:29:04
button and width to it so
01:29:11
here I'll add border as 5 and width as
01:29:15
8.
01:29:19
like this
01:29:21
and now I'm going to add internal
01:29:24
padding to this button okay and internal
01:29:27
padding is provided in the same way but
01:29:30
this time we will mention the pad y
01:29:33
value inside this button so here I'll
01:29:36
mention pad y equals to 10.
01:29:40
so you can see the button size is
01:29:43
increased okay vertically
01:29:46
and if you notice what is happening here
01:29:49
this is getting distorted right this is
01:29:51
because uh this button is at row 0 okay
01:29:55
so row 0 is taking this much space so
01:29:58
Row 1 is starting just after that from
01:30:01
here right that is why this is getting
01:30:04
uh to the bottom okay getting outside of
01:30:08
the screen if we will increase more pad
01:30:10
y uh this will go more down okay so what
01:30:16
we have to do I want this button to take
01:30:20
three row spaces okay so it will be at
01:30:23
the center position so it will take
01:30:24
three row space this row space then this
01:30:27
row space and the last row space okay so
01:30:30
this button will take three row space
01:30:32
for that uh to this button frame uh we
01:30:37
can mention row span of three so now
01:30:41
this button frame will take three row
01:30:43
spaces
01:30:45
so if I run it so now you can see that
01:30:48
that issue is resolved right
01:30:51
and now I'm going to provide vertical
01:30:54
padding to this button and this Frame
01:30:56
for that inside this grid method uh we
01:31:00
have to pass pad y
01:31:02
of 20 pixels
01:31:05
okay so between this Frame and this
01:31:08
button you can see vertical spacing okay
01:31:13
and I also want to add horizontal
01:31:15
padding so I'll mention pad X
01:31:19
S5
01:31:23
okay
01:31:24
and now in the same way we have to
01:31:27
create other buttons so I will be simply
01:31:29
copying this button
01:31:36
and paste it so this will change to Bell
01:31:39
button
01:31:42
the text will be changed to Bill
01:31:47
column value will be changed to 1.
01:31:51
okay
01:31:54
like this after this we have to create
01:31:57
email button
01:32:03
foreign
01:32:13
button
01:32:38
and at last we will have a clear button
01:33:01
so the GUI part is completed in the next
01:33:04
video we will work on the functionality
01:33:06
part of these buttons
01:33:08
let me know in the comments if you have
01:33:10
successfully completed the GUI part
01:33:13
see you in the next video thank you for
01:33:16
watching

Description:

In this multi-part tutorial, we will guide you through the process of building a Retail Billing System using Python Tkinter GUI. In this particular part, we will focus on creating the GUI for the application. With the help of Python and Tkinter GUI, we will create a Retail Billing System that can calculate the total of products that the user is purchasing, generate a bill, save the bill, search for any bill in the app, send the bill to any email, and even print the bill. We will cover every step of the process, from designing the user interface to implementing the necessary functions. Our step-by-step approach will make it easy for anyone to follow along, even if you are new to Python or GUI programming. So, whether you are a beginner or an experienced programmer, this tutorial will help you learn how to build a complete Retail Billing System using Python Tkinter GUI. Stay tuned for the next parts of the tutorial, where we will dive deeper into the application's functionalities. Get Source Code: https://faizan-er.myinstamojo.com/product/53144/billing-system/ Don't forget to subscribe to our channel for more tutorials like this, and leave a comment below if you have any questions or suggestions. Timestamp: (00:00:00) Introduction (00:00:13) Project Demo (00:04:46) Project Setup (00:06:19) Quick Introduction to Tkinter GUI Programming (00:07:20) Creating the Main Window (00:12:35) Adding a Heading Section (00:20:29) Creating the Customer Details Section (00:39:46) Building the Products Section (01:16:25) Designing the Bill Menu Section (01:27:16) Adding Buttons to the User Interface (01:33:01) Conclusion: Ending the GUI Development Part Watch how to download and install Python : https://www.youtube.com/watch?v=MHEMFpH62Ck Watch how to download and install PyCharm IDE : https://www.youtube.com/watch?v=tITKpqkY4JA

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "1.Build a Retail Billing System using Python Tkinter GUI - Step-by-Step Tutorial" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "1.Build a Retail Billing System using Python Tkinter GUI - Step-by-Step Tutorial" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "1.Build a Retail Billing System using Python Tkinter GUI - Step-by-Step Tutorial" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "1.Build a Retail Billing System using Python Tkinter GUI - Step-by-Step Tutorial" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "1.Build a Retail Billing System using Python Tkinter GUI - Step-by-Step Tutorial"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "1.Build a Retail Billing System using Python Tkinter GUI - Step-by-Step Tutorial"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.