Tkinter is a Python library that makes it easy to create graphical user interfaces. Tkinter is the only GUI Framework that comes pre-installed with the Python Standard Library. Tkinter’s main advantage is that it is cross-platform, which means that the same code may run on Windows, Mac OS. X, and Linux. We will discuss an example where we have to create the registration form with tkinter in python. where we mention Name of a person, Email ID, His/Her Contact Number, Gender and password with (*).
Create the registration form (Mentioned in the picture attached)
Password should show asterisk (*).
#Don't work in online compiler, prefer using IDLE
from tkinter import *
list_of_Country=("United States","India","Sri Lanka","France")
This program will work in Python IDLE as Tkinter is by default available in PYTHON . You can even change the color of the button or texts by just typing the color name of your choice,
Related Article: How To Enhance Your Windows 10 Performance(Updated)
Add bg=’background Colour name’,fg=’Foreground Color name’)or else only use bg = ‘color name’ As bg is used to add initial color and fg is used to add color when you click on it.
To show password as (*) use show=’*’ in your entry section of password.
Also you can change the dimensions of whole form by changing the value in
altering the value between double quotes. This will adjust your form pixels.
Also you can adjust the place of elements by changing the x and y dimensions of place. x represents the change of position along horizontal line and y represents the change in position vertically.
We have lots of ways to develop GUI based program by
Tkinter is a typical GUI (graphical user interface) library for Python. Tkinter is Python’s default GUI package, as well as the most popular way to programme GUIs in Python. Tkinter is a collection of wrappers that convert Tk widgets into Python classes.
This is essentially a C++-based, open-source, cross-platform GUI toolkit. Also available as an alternative to Tkinter
JPython is a Python platform for Java that gives Python scripts on the local machine smooth access to Java class libraries.