Grid made by Label and Entry : Table Grid « GUI Tk « Python






Grid made by Label and Entry

Grid made by Label and Entry

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()

           
       








Related examples in the same category

1.Grids on two windowsGrids on two windows
2.Grid made by the Label with Raised borderGrid made by the Label with Raised border
3.2d table of input fields2d table of input fields
4.Grid layout manager demonstration.Grid layout manager demonstration.