Tkinter GUI Programming
Examples on Tkinter
Create Forms using Tkinter
Python GUI window we can create by using Frame in Tkinter. Frame works as a container to put the widgets(like label,button etc) on it.
Tkinter Form and widget design:
GUI form and widget may de designed as following
from tkinter import *
root=tk.Tk()
frame=tk.Frame(root)
frame.pack()
root.mainloop()
Output of the above program is as following.
To set the size of the frame window geometry(width*height) function may be used as following example. The controls may also be sized with width and height attribute.
from tkinter import *
def GameScreen():
game_screen=Tk()
game_screen.title("Game Screen")
game_screen.geometry("300x250")
Label(game_screen, text="Please enter your name").pack()
Label(game_screen, text="Username").pack()
username_entry = Entry(game_screen, textvariable="username").pack()
Button(game_screen, text="Click", width=10, height=1).pack()
game_screen.mainloop()
GameScreen()
Output of the above program is as following.
Click Here
Tutorials
C is a very powerful and widely used language. It is used in many scientific programming situations. It forms (or is the basis for) the core of the modern languages Java and C++. It allows you access to the bare bones of your computer.C++ is used for operating systems, games, embedded software, autonomous cars and medical technology, as well as many other applications. Don't forget to visit this section...
Video/ C Introduction
Watch video in full size