Sunday, March 28, 2021

Introduction To Python Tkinter GUI Programming

Introduction To Python Tkinter GUI Programming

Commonly there are 2 types of interfaces for desktops -  command-line interface (CLI) where users interact with the system by writing commands, and a Graphical User Interface (GUI) where users interact with the system through visual widgets such as buttons, menus, windows etc. Python provides a lot of libraries to create cross-platform GUIs such as Tkinter, Pymsgbox, Pyqt, and much more. In this series of articles, we will study the Tkinter package.

In this article, we will learn

● Basics of Tkinter

● Introduction to Tkinter Widgets

● Tkinter Hello World App

● Tkinter Button

● Tkinter Entry Widget

Basics Of Tkinter

Tkinter is an Inbuilt library commonly used for GUI development. The underlying implementation of Tkinter is in C language.

The basic structure of the Tkinter program is like this...

  1. Import tkinter
  2. Create root i.e. main window of App
  3. Attach widgets such as Buttons, Menu, Inputs etc.
  4. Create Infinite event loop
Introduction to Tkinter Widgets 

Widget is an entity such as GUI button, sidebar, menu that provides user interaction

(continued...)

from Planet SciPy
read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...