Skip to main content

How to create a button in Tkinter Python

 Hello guys,  In this blog we are going to learn how to create  a button in Python GUI using Tkinter.

HERE"s THE CODE


#how to create a button IN python GUI Tkinter

import tkinter as tk

root = tk.Tk()

button = tk.Button(text="Button").pack()

root.mainloop()



If you are intrested to know how this work i shall be posting in next blog.

Comments

Popular posts from this blog

How to run Python in android phone?

Hello Everyone,               Now days Our smartphone became so powerful that we can run any thing on it. Some of the people can't afford laptop or pc for programming. They want to program in their smartphones but they can't find app which is best for running program. Today I am telling you app which runs python beautifully.. App -   https://play.google.com/store/apps/details?id=ru.iiec.pydroid3 You can download this from playstore and this run smoothly on you mobile Device. Here is an example of this--  Subscribe to my channel and I'll upload more practice video of Python. Follow me on Instagram -  https://instagram.com/praphull_verma12?igshid=6otkb0qmkr4q

How to create a 3d Rubic's cube in python using tkinter

 In this blog post, I will show you how to create a 3d rubic's cube in python using tkinter, a standard GUI library for python. Tkinter provides various widgets and methods to create graphical user interfaces. A 3d rubic's cube is a popular puzzle game that consists of a cube with six faces, each divided into nine smaller squares of different colors. The goal is to rotate the faces of the cube until each face has only one color. To create a 3d rubic's cube in python using tkinter, we will need to use the following steps: 1. Import the tkinter module and create a root window. 2. Create a canvas widget to draw the cube on. 3. Define the coordinates and colors of the vertices and faces of the cube. 4. Define a function to draw the cube on the canvas using polygons. 5. Define a function to rotate the cube along the x, y or z axis using matrix multiplication. 6. Define a function to handle keyboard events and call the rotation function accordingly. 7. Bind the keyboard events to...

How to use python from Android devices? First program|||| Hello world! Program in python

Hello guys! If you have seen my previous blog "how to run python on Android devices" Link -  https://praphullverma.blogspot.com/2020/06/how-to-run-python-in-android-phone.html?m=1 Then You know how to get started in programming with smartphone! In this blog you are going to make your first program in Python|| The code you are going to enter is - print('Hello, World') For next blog subscribe to my blogger account I'll back soon..