Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_worksheet.py
- from Tkinter import *
- rows = []
- for i in range(7):
- cols = []
- for j in range(5):
- e = Entry(relief=RIDGE)
- e.grid(row=i, column=j, sticky=NSEW)
- e.insert(END, '%d.%d' % (i, j))
- cols.append(e)
- rows.append(cols)
- def onPress():
- for row in rows:
- for col in row:
- print col.get(),' ',
- print
- print
- print rows[1][2].get()
- print
- Button(text='Fetch Data', command=onPress).grid()
- mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement