0% found this document useful (0 votes)
10 views

Basics

Basic of tktinter

Uploaded by

Vinayak.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Basics

Basic of tktinter

Uploaded by

Vinayak.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

UNIVERSITY INSTITUTE OF COMPUTING

MASTER OF COMPUTER APPLICATIONS

PYTHON PROGRAMMING

DISCOVER . LEARN . EMPOWER


1
Contents

• Basics of creating a simple Tkinter window.

2
Building Your First Python GUI Application
With Tkinter
The foundational element of a Tkinter GUI is the window. Windows are the containers in
which all other GUI elements live. These other GUI elements, such as text boxes, labels,
and buttons, are known as widgets. Widgets are contained inside of windows.

First, create a window that contains a single widget. Start up a new Python shell session
and follow along!

3
Building Your First Python GUI Application
With Tkinter
With your Python shell open, the first thing you need to do is import the Python GUI
Tkinter module:
>>> import tkinter as tk
A window is an instance of Tkinter’s Tk class. Go ahead and create a new window and
assign it to the variable window:
>>> window = tk.Tk()
When you execute the above code, a new window pops up on your screen. How it looks
depends on your operating system:

4
Building Your First Python GUI Application
With Tkinter

5
6
7
8
9
10
References
1. https://www.cs.mcgill.ca/~hv/classes/MS/TkinterPres/#WhatIsTk
2. https://www.tutorialspoint.com/how-to-install-tkinter-in-python
3. https://www.python.org/about/gettingstarted/
4. https://www.javatpoint.com/python-tutorial
5. https://www.learnpython.org/

11
THANK YOU

12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy