Tkinter
Introduction to Python GUI
- Python provides various options for developing graphical user interfaces (GUIs). Most important are listed below.
Tkinter:- It is the easiest among all to get started with. It is Python’s standard GUI (Graphical User Interface) package. It is the most commonly used toolkit for GUI Programming in Python.
JPython:- It is the Python platform for Java that is providing Python scripts seamless access o Java class Libraries for the local machine.
wxPython:- It is open-source cross-platform GUI toolkit written in C++. It one of the alternatives to Tkinter, which is bundled with Python.
-There are many other interfaces available for GUI. But these are the most commonly used ones.
Python GUI Programming - Tkinter
- It is the standard GUI toolkit for Python.
- It was written by Fredrik Lundh.
- Python when combined with Tkinter provides a fast and easy way to create GUI applications. Tkinter provides a powerful object-oriented interface to the Tk GUI toolkit.
- Creating a GUI application using Tkinter is an easy task.
Perform the following steps:-
To create a tkinter:
1).Importing the module – tkinter
2).Create the main window (container)
3).Add any number of widgets to the main window
4).Apply the event Trigger on the widgets.
How To Install Tkinter :-
To see if you have Tkinter, launch python; then at the Python prompt, type: -
import Tkinter
Or in Python 3: import tkinter
sudo apt-get install python-tk (for version 2)
sudo apt-get install python3-tk (for versoin 3)
There are two main methods used you the user need to remember while creating the Python application with GUI.
Tk(screenName=None, baseName=None, className=’Tk’, useTk=1):
To create a main window, tkinter offers a method ‘Tk(screenName=None, baseName=None, className=’Tk’, useTk=1)’. To change the name of the window, you can change the className to the desired one.
The basic code used to create the main window of the application is:
m=tkinter.Tk() where m is the name of the main window object
mainloop():-
- There is a method known by the name mainloop() is used when you are ready for the application to run.
- mainloop() is an infinite loop used to run the application, wait for an event to occur and process the event till the window is not closed.
m.mainloop()
Example:
import tkinter
import tkinter
m = tkinter.Tk()
m.mainloop()
To Next Artical We Discuss About How to Use Pack,grid And Place Method In Python...
Check Out Our Python ALL Post In Just One Click....
11 Comments
https://bayanlarsitesi.com/
ReplyDeleteKocatepe
İstinye
Maltepe
Rami
QLG7G
Balıkesir
ReplyDeleteBursa
Mersin
Konya
Van
BBVHX
istanbul evden eve nakliyat
ReplyDeletekonya evden eve nakliyat
düzce evden eve nakliyat
bursa evden eve nakliyat
diyarbakır evden eve nakliyat
5TE6
FC68F
ReplyDeleteErzurum Muhabbet Sohbet
tokat kadınlarla sohbet
amasya en iyi ücretsiz görüntülü sohbet siteleri
Mardin Telefonda Rastgele Sohbet
kadınlarla rastgele sohbet
zonguldak bedava sohbet chat odaları
aksaray mobil sohbet siteleri
aksaray kadınlarla rastgele sohbet
canlı görüntülü sohbet uygulamaları
16CC3
ReplyDeleteısparta sesli sohbet sitesi
sinop görüntülü sohbet uygulama
kırklareli mobil sohbet chat
yabancı görüntülü sohbet
rastgele sohbet
görüntülü sohbet siteleri ücretsiz
mobil sohbet
aydın en iyi görüntülü sohbet uygulamaları
bingöl mobil sohbet
CF9EE
ReplyDeleteParasız Görüntülü Sohbet
Ceek Coin Hangi Borsada
Instagram Beğeni Satın Al
Youtube İzlenme Satın Al
Azero Coin Hangi Borsada
Parasız Görüntülü Sohbet
Binance Referans Kodu
Facebook Grup Üyesi Hilesi
Binance Ne Zaman Kuruldu
شركة تسليك مجاري بالخبر qjJrFx6ATT
ReplyDeleteشركة مكافحة الفئران بالاحساء wemKqPpwTE
ReplyDeleteشركة مكافحة الحمام بالاحساء Vc8LDSzFAa
ReplyDeleteنفخ المجاري بالاحساء e8puo6CiLt
ReplyDeleteشركة عزل اسطح بالقطيف DHE41UU2kO
ReplyDelete