Label width and height : Label « GUI Tk « Python






Label width and height

Label width and height
 

from Tkinter import *
root = Tk()
labelfont = ('times', 20, 'bold')                  
widget = Label(root, text='Hello config world')
widget.config(height=3, width=20)
widget.pack(expand=YES, fill=BOTH)
root.mainloop()
           
         
  








Related examples in the same category

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