A label and a button : Label « GUI Tk « Python






A label and a button

A label and a button
 

import sys, Tkinter
Tkinter.Label(text="Welcome!").pack()
Tkinter.Button(text="Exit", command=sys.exit).pack()
Tkinter.mainloop()

           
         
  








Related examples in the same category

1.Basic coding styles with labelsBasic coding styles with labels
2.Set side to topSet side to top
3.Add a label to a frameAdd a label to a frame
4.Load image to label
5.Label wraplength
6.Set text and font for Label
7.Label styleLabel style
8.Label on frameLabel on frame
9.Label border: RAISED, SUNKEN, FLAT, RIDGE, GROOVE, SOLIDLabel border: RAISED, SUNKEN, FLAT, RIDGE, GROOVE, SOLID
10.Our First Tkinter Program: a label and a windowOur First Tkinter Program: a label and a window
11.Simplest LabelSimplest Label
12.Label background and foregroundLabel background and foreground
13.StringVar and Label variable
14.Bind variable to Label
15.Label width and heightLabel width and height