Mega Code Archive

 
Categories / Python Tutorial / Tkinker
 

Add Label and Entry by using table layout

from Tkinter  import * colors = ['red', 'green', 'orange', 'white', 'yellow', 'blue']       r = 0 for c in colors:     Label(text=c, relief=RIDGE,  width=25).grid(row=r, column=0)     Entry(bg=c,   relief=SUNKEN, width=50).grid(row=r, column=1)     r = r+1       mainloop()