---
title: "Tkinter"  
description: "Tkinter"  
author: "Anonymous User"  
published: 2018-06-27  
updated: 2018-06-27  
canonical: https://www.mindstick.com/forum/34546/tkinter  
category: "python"  
tags: ["gui", "python"]  
reading_time: 1 minute  

---

# Tkinter

what is tkinter in [python](https://www.mindstick.com/articles/75378/simple-yet-useful-tips-when-using-python)?

## Replies

### Reply by Prakash nidhi Verma

- Tkinter is a lib for designing GUI in python.

- Import the Tkinter module. Create the GUI application in main window.

- Add one or more of the above-mentioned widgets to the GUI application.

Syntax :

```
import tkinter top = tkinter.Tk()
top.mainloop()
```

Example for adding any text with a button :

```
from tkinter import* from tkinter ttk
root = Tk()
label (root,text="Hello!").pack()
button= ttk.Button(root,text="click me")
button.pack()
def callback():
 print("clicked!")
root.main loop()
```

![Tkinter](https://www.mindstick.com/mindstickforums/2c541860-f753-4b1d-b087-5d43a475d944/images/5660f768-d944-491f-ab6e-d6492cc67d22.jpg)\


---

Original Source: https://www.mindstick.com/forum/34546/tkinter

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
